IBM Interview Question

they asked anagram question from leetcode.