Convert a Binary Tree into its Mirror Tree
Mirror of a Tree: Mirror of a Binary Tree T is another Binary Tree M(T) with left and right children of all non-leaf nodes interchanged. Code: package trees; public class N1804_MirrorTree { Node root = null; static void convertToMirror(Node node){ if(node == null){ return; } Node temp = node.left; node.left = node.right; node.right = temp; convertToMirror(node.left); convertToMirror(node.right); } static void printTree(Node node){ if(node == null) return; ...