ICR interview question

Anagrams leetcode and prior experience