🚀 Day 21 – DSA Journey Solved LeetCode 560 (Subarray Sum Equals K) today. Started with brute force O (n²), then realized Kadane doesn’t fit since it’s for max/min subarrays, not counting exact sums.
//Q112: Write a program to take an integer array arr as input. The task is to find the maximum sum of any contiguous subarray using Kadane's algorithm. Print the maximum sum as output. If all elements ...
Some results have been hidden because they may be inaccessible to you
Show inaccessible results