Adobe interview question

Was asked a anagram leetcode question