public TreeSort(Stack p,WriteOutput w) { tree = new Tree(p); writer = w; inOrder(tree.root); writer.write("The tree sort took " + tree.c + " comparisons"); }
public ReadInput(String i) { input = File.ReadAllLines(i); output = new Stack(); foreach (String x in input) { try { Int32.Parse(x); output.push(Int32.Parse(x)); } catch (Exception e) { } } }
public Tree(Stack x) { items = x; root = new Node(getNextItem()); fillTree(); }