Standard level order traversal to test above function
def levelOrder ( root ) : NEW_LINE INDENT queue = createQueue ( SIZE ) ; NEW_LINE Enqueue ( root ) ; NEW_LINE while ( not isEmpty ( queue ) ) : NEW_LINE INDENT temp = Dequeue ( ) ; NEW_LINE print ( temp . data , end = ' ▁ ' ) NEW_LINE if ( temp . left ) : NEW_LINE INDENT Enqueue ( temp . left ) ; NEW_LINE DEDENT if ( temp . right ) : NEW_LINE INDENT Enqueue ( temp . right ) ; NEW_LINE DEDENT DEDENT DEDENT