private static MyBinaryTree <int> GetADummyTree() { var tree = new MyBinaryTree <int>(); tree.Root = new MyBinaryTreeNode <int>(15); tree.Root.LeftNode = new MyBinaryTreeNode <int>(10); tree.Root.RightNode = new MyBinaryTreeNode <int>(20); tree.Root.LeftNode.LeftNode = new MyBinaryTreeNode <int>(8); tree.Root.LeftNode.RightNode = new MyBinaryTreeNode <int>(12); tree.Root.RightNode.LeftNode = new MyBinaryTreeNode <int>(18); tree.Root.RightNode.RightNode = new MyBinaryTreeNode <int>(22); return(tree); }
public InOrderTraversal(MyBinaryTree <T> tree) { Tree = tree; }