Check if nodes of current levels are anagrams or not .
curr_level1 . sort ( ) NEW_LINE curr_level2 . sort ( ) NEW_LINE if ( curr_level1 != curr_level2 ) : NEW_LINE INDENT return False NEW_LINE DEDENT return True NEW_LINE