Maximum Subarray
Given an integer array nums, find the subarray with the largest sum, and return its sum.
Maximum Subarray

Given an integer array nums, find the subarray with the largest sum, and return its sum.

Example 1:
Input: [-2,1,-3,4,-1,2,1,-5,4]
Output: 6
Input
arr =[-2,1,-3,4,-1,2,1,-5,4]

-2

1

-3

4

-1

2

1

-5

4

Current Sum
0
Max Sum
-2
Variables
No variables to display
DepthFunction Call
Stack empty
0/39