Check if nodes of current levels are anagrams or not .
sort ( curr_level1 . begin ( ) , curr_level1 . end ( ) ) ; sort ( curr_level2 . begin ( ) , curr_level2 . end ( ) ) ; if ( curr_level1 != curr_level2 ) return false ; } return true ; }