Driver Code
static public void Main ( String [ ] args ) { BinaryTree tree = new BinaryTree ( ) ; tree . root = new Node ( 1 ) ; tree . root . left = new Node ( 2 ) ; tree . root . right = new Node ( 3 ) ; tree . root . left . left = new Node ( 4 ) ; tree . root . left . right = new Node ( 5 ) ; Console . WriteLine ( " Preorder ▁ traversal ▁ " + " of ▁ binary ▁ tree ▁ is ▁ " ) ; tree . printPreorder ( ) ; Console . WriteLine ( " STRNEWLINE Inorder ▁ traversal ▁ " + " of ▁ binary ▁ tree ▁ is ▁ " ) ; tree . printInorder ( ) ; Console . WriteLine ( " STRNEWLINE Postorder ▁ traversal ▁ " + " of ▁ binary ▁ tree ▁ is ▁ " ) ; tree . printPostorder ( ) ; } }