Infosys interview question

anagram grouping leetcode medium question pseudocode.