Approach using deque


this is my code. i did this using deque. is it fine to use deque or should i do htis using stack or queue?

@tanjuljain19,
As far as it is AC, what you use does not matter, you will get a plenty of problems that you can do with stack/queues.

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.