Pop complete current level
while ( NodeCount > 0 ) : NEW_LINE INDENT Node = q . queue [ 0 ] NEW_LINE q . get ( ) NEW_LINE if ( Node . left != None ) : NEW_LINE INDENT q . put ( Node . left ) NEW_LINE DEDENT if ( Node . right != None ) : NEW_LINE INDENT q . put ( Node . right ) NEW_LINE DEDENT NodeCount -= 1 NEW_LINE DEDENT