Impementation of stack using queue

Please explain me i m not getting what it was happening

@Gade_Deepthi what exactly did you not understand? I’d suggest doing a dry run of the code once using pen and paper and things will become more clear.

Yaah i did it I m getting littile confused

@Gade_Deepthi please tell me what part are you confused about? what exactly are you not getting?

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.