You can invert a binary tree using recursive and iterative approaches. Below are the three approaches to solve this problem: Recursive Approach: Swapping the left and right child of every node in subtree recursively. Using Iterative preorder traversal: Converting recursive approach to iterative by using stack. https://favtutor.com/blogs/invert-binary-tree