Mental Model
Split the array into two halves, find the best subarray in the left, right, and crossing the middle, then pick the best among them.
Analogy: Imagine you have a long road with some good and bad spots. You want to find the best continuous stretch. You look at the left half, the right half, and the middle area where they meet, then choose the best stretch overall.
Array: [ -2, 1, -3, 4, -1, 2, 1, -5, 4 ] Split: [ -2, 1, -3, 4, -1 ] | [ 2, 1, -5, 4 ] Left max subarray -> somewhere here Right max subarray -> somewhere here Crossing max subarray -> crosses middle Result: max of these three
