Subarray problems are among the most common problems in DSA.

And they are also among the easiest to overcomplicate.

You are given an array and asked something like:

Find the maximum sum of a subarray.

or: