public void Insert(int d) { if (d <= Data) { if (Left == null) { Left = new RankNode(d); } else { Left.Insert(d); } LeftSize++; } else { if (Right == null) { Right = new RankNode(d); } else { Right.Insert(d); } } }
public void track(int num) { if (root == null) { root = new RankNode(num); } else { root.Insert(num); } }