https://ide.codingblocks.com/s/424052 , please check this code OR if there is any other approach efficient than this , then please let me know.
PRATEEEK SIR AND CODING
@CODER_JATIN your code is correct and passing all the test cases:
and it is the correct way of doing the question.
Happy Learning!!
koi error ni hai , mai just yeh puch rha hu ki isse jyada achhi approach bhi hai koi is question ko karrne ki?
@CODER_JATIN no your approach is already the optimised one.
you are already doing it by stack and this is the question of stack only.
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.