1tc is failed...whats the error?

hello @garganshul151 you are doing it in a wrong way you have to use stack with indexes of the array in order to implement this question’s code .
like if some element is greater then you have to check with the help of stack that upto which index of its pevious elements it is coming greater .
your code is falling against test cases like
100 80 60 70 60 75 85
expected output=1 1 1 2 1 4 6 END
your output=1 1 1 1 1 1 1 END
i hope i have cleared your doubt .
Happy Learning !!