What is wrong with my code for CHPINTU in C

Given above is my code for CHPINTU for MARCH20B contest. It is displaying wrong answer after submitting it. But I am not able to figure out where it is going wrong as it is giving the test case answer correctly along with some more cases that I thought of.

So could somebody tell me what is the error?

int x = sizeof(arr3)/sizeof(arr3[0]);
quickSort(arr3, 0, x-1);

sorting is useless, just iterate over arr3 and taken minimum of all non zero element

1 Like