Abha i think by mistake you send me wrong answer for this TC 7 3 4 5 2

Hello Abha I made some changes in my code my code runs now and all TC pass . But i would like to tell you send me wrong answer for this TC 7 3 4 5 2 i think

5
7 3 4 5 2

correct anser is : -1 4 5 -1 7
and you send me this answer : -1 4 5 7 7

if your code passes the test cases might be weak .but think like this
for 7 we have no higher element so -1
3 -> 4
4->5
5 we will give 7 not -1 because in the question its mentioned that the array is circular
To find the next greater number for element Ai , start from index i + 1 and go uptil the last index after which we start looking for the greater number from the starting index of the array since array is circular.