1 test case is coming out to be wrong. Can anyone explain the problem?

I have attached the link to the code in the comments.

change your max value from 0 to arr[0], and then compare the other values,


This is the corrected code

1 Like