Function to update the arrays with their cumulative sum
cumulativeSum ( a , N ) NEW_LINE cumulativeSum ( b , N ) NEW_LINE if b [ N - 1 ] > a [ N - 1 ] : NEW_LINE INDENT findSubarray ( N , a , b , False ) NEW_LINE DEDENT else : NEW_LINE