Quantiphi interview question

Largest Subarray Question (Kadane's Algorithm)