Skip to content

Latest commit

 

History

History
5 lines (3 loc) · 234 Bytes

File metadata and controls

5 lines (3 loc) · 234 Bytes

Idea behind the solution

We just need to go throught each node of the tree swapping their childrens. At each node, we swap and add them to the stack so they can be popped later on to do the same.

Do this until the stack is empty.