Maximum sum query


i am doing same,as prateek bhaiya taught in the video,still failing 2 test cases.plz help