public IEnumerator <int> GetEnumerator() { if (root == null) { Enumerable.Empty <int>(); } else { List <int> values = new List <int>(); BinaryTreeUtilities.GetAllValues(root, values); foreach (var item in values) { yield return(item); } } }
public void PrintLevelOrder() { BinaryTreeUtilities.PrintLevelOrder(root); }