public K[] getAllKeys() { List <K> r = new List <K>(); r.Add(key); r.AddRange(left == null ? new K[0] : left.getAllKeys()); r.AddRange(right == null ? new K[0] : right.getAllKeys()); return(r.ToArray()); }
public K[] getAllKeys() { if (root == null) { return(new K[0]); } return(root.getAllKeys()); }