| | | | | |

Levelorder Iterator Initialization (Queue Based)

  template < class C >
  void LevelorderBTIterator<C>::Init(Node* n)
  {
    que_.Clear();
    if (n == nullptr) return;
    que_.Push(n);
    while (!que_.Empty() && que_.Front()->IsDead())
      Increment();
  }

| | Top of Page | 14. BST Iterators - 27 of 41