my code: https://ide.codingblocks.com/s/243708
my code is not giving any output
What is wrong in this?
my code: https://ide.codingblocks.com/s/243708
my code is not giving any output
What is wrong in this?
there is no need to make a dfferent function insertatbottom
just insert x in backtrack
once you dry run it you will understand it
It gives wrong output. I think it does not reverse a stack .
okay
sorry for confusion
i misinterpret the question i think we have to print stack in reverse order which is not the case
your Approach is correct
only thing you have to do is pass stack by reference
i hope this help
if you have more doubts regarding this feel free to ask
if your doubt is resolved mark it as resolved from your doubt section inside your course