Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace JSLTrees
- {
- class Program
- {
- static void Main(string[] args)
- {
- int[] treeNumbers = new int[] { 15, 8, 22, 6, 55, 12, 19 };
- JSLTree tree = new JSLTree();
- for (int i = 0; i < treeNumbers.Length; i++)
- tree.Add(treeNumbers[i]);
- tree.GetTreeHeight(tree, tree.Root, 0);
- NodePositionInfo rootInfo = new NodePositionInfo(2 ^ (tree.TreeLength - 1), tree.Root.Value.ToString());
- List<List<NodePositionInfo>> list = new List<List<NodePositionInfo>>();
- list[0].Add(rootInfo);
- tree.GetTreeNodePosInfo(tree.Root.Left, list, 0, 0);
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement