Driver program to test the above functions
public static void main ( String args [ ] ) { BinaryTree tree = new BinaryTree ( ) ; tree . root = new Node ( ' a ' ) ; tree . root . left = new Node ( ' b ' ) ; tree . root . right = new Node ( ' c ' ) ; tree . root . left . left = new Node ( ' d ' ) ; tree . root . left . right = new Node ( ' e ' ) ; tree . root . right . left = new Node ( ' f ' ) ; tree . root . right . right = new Node ( ' g ' ) ; tree . root . left . left . left = new Node ( ' h ' ) ; tree . root . left . left . right = new Node ( ' i ' ) ; tree . root . left . right . left = new Node ( ' j ' ) ; tree . root . left . right . right = new Node ( ' k ' ) ; tree . root . right . left . left = new Node ( ' l ' ) ; tree . root . right . left . right = new Node ( ' m ' ) ; tree . root . right . right . left = new Node ( ' n ' ) ; tree . root . right . right . right = new Node ( ' o ' ) ; System . out . println ( " Inorder ▁ Traversal ▁ of ▁ given ▁ tree " ) ; tree . printInorder ( ) ; tree . reverseAlternate ( ) ; System . out . println ( " " ) ; System . out . println ( " " ) ; System . out . println ( " Inorder ▁ Traversal ▁ of ▁ modified ▁ tree " ) ; tree . printInorder ( ) ; } }