Dividing Array in Greedy


It has cleared all the testcases provided but my doubt is with {0,-3,10 ,12,13} in this case minimum should be 4 but
the code’s output is 5. I don’t have any issue with maximum. I don’t know how it has cleared testcases.

@nirupama1 your given test case

is inconsistent as n is even.

I see it now. It is given in input format