how is insert at bottom functin working? why do we have to push the element in line 34…that element if not pushed again still remains at the top?
Stack reverse using recursion
hey @Vibhuti0206, in line no 34 we pushing the element that we have popped out in order insert our desired element at bottom.
I will suggest you to make call stack once, recursion is difficult to understand and to understand the logic you need to call stack for practice.