Payfare interview question

Grouping Anagram coding question (similar to leetcode)