Next Greater Element II Leetcode
Please help me to solve this kind of error…
Sir,is this code visible to you through this link?
Yes, the code is visible can you tell me the name of the question.
Next Greater Element II Leetcode
my code is failing for similar elements.like second 1 in end returns -1

you’ve unnecessarily made the code complex, you just need to iterate the array twice using stack and you would get answer.
ohh.I will try implementing that.
Pr ab isko kaise theek kiya jaye. 
sir ? ? ???
Sorry, the notification got messed up and I must’ve missed this one, can you explain the approach you are trying to use in order to solve this question

ohho yeh to bda hogya. 
instead of pushing the elements value inside the stack push the index of the element
Code
Ohh. Thank you sir 
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.