Cses Problem Set Maximum Subarray Solution