Is there any practical importance of implementing Stack using Queue and Queue using Stack?

arrays and linked lists always perform better for implementation. Is there any example where Stack is used for implementing Queue or vice versa ??

hi @harshsharmajnv_9b70d236614796d5 no here u can see time complexity is also increasing push and pop happens in o(1) in normal stack, but if u r making using queues it may have taken o(n). These kinds of questions are aked in interviews thats why its here :slight_smile:

1 Like

Okay.
Thanks for your help 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.