Video name :Maximum subarraysum 2 course name Algo++ online

I want to know if I would have not seen this video
how would i have approached currentSum=cumSum[j]-cumSum[i]; this statement.