Amazon Interview Question

Finding the max sum of subarrays

Interview Answer

Anonymous

Feb 22, 2020

Brute force looping over all the locations and returning the max array sum N^2 Linear Visiting the numbers one by one and accumulating the sum until the sum<0 where you start over and reinitialize sum=0

1