CoStar Group Interview Question

Solve the anagrams leetcode please.