Bytedance | onsite | Top 2 maximum subarrays in single array

Given an array of integers, find two non-overlapping subarrays which have the largest sum.

The number in each subarray should be contiguous.

Return the largest sum.

How do we solve this?

Comments (1)