End of Year Sale: Use Coupon Code END2025 to Get Extra 25% Off.
stack1 and stack2.stack1 if it is not null.stack1 is not empty:
a. Pop a node from stack1 and push it onto stack2.
b. Push the left child of the popped node onto stack1 if it exists.
c. Push the right child of the popped node onto stack1 if it exists.stack2 will contain the nodes in postorder sequence. Pop all nodes from stack2 and add them to the output list.