Programmer, engineer, athlete, leader living in the Silicon Valley.
So I spent a little more time than I should have on this problem and wanted to share. Jacob has a great solution to this problem here, but the code is a bit too verbose with the datetime construction, making it less readable than…
Let’s say you are given an array like this
-2 1 -3 4 -1 2 1 -5 4
How do you know the largest subarray? By inspection we can see that the subarray