Corrected the MaxSliceSum solution