My code is only passing one test case

hello @anshulgurawalia

a) the given array is circular , ur logic works only for linear array

can i make it circular by first putting j to the end of the array instead of putting to i+1 and check for
( j+1) % n index that value is greater or smaller

yeah that is correct way,
also the stopping will also change.

i will try please be connected with me

please see this code and tell where i am doing mistake ?
Coding Blocks IDE

check now->

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.