Standard level order traversal to test above function
void levelOrder ( node * root ) { Queue * queue = createQueue ( SIZE ) ; Enqueue ( root , queue ) ; while ( ! isEmpty ( queue ) ) { node * temp = Dequeue ( queue ) ; cout << temp -> data << " ▁ " ; if ( temp -> left ) Enqueue ( temp -> left , queue ) ; if ( temp -> right ) Enqueue ( temp -> right , queue ) ; } }