Insight 1:

find all zeros and make partitions between these 0s

Insight 2:

Consider(left and right subarray max) full array with first -ve and leaving last -ve

OR

last -ve and leave 1st -ve

GREEDY

results matching ""

    No results matching ""