Not able to understand the logic for the question

not able to understand the logic for the question

Basically we have to maintain array of stacks.
refer this https://ide.codingblocks.com/s/24658

Hope u are able to figure out the logic now. I u still have any doubts u can msg back here.

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.

can you pls explain line 54 to 63, why cannot we directly print the elements of stack 3 and instead we assigned it to stack 1,and then printed it?


See this code u will be able to better understand

ye there is no need to of stack 3 also. we can do it directly.

okay thanks;)…

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.