Qualcomm interview question

greatest sub sequential sum question