Group Anagrams (LeetCode 49)The problem You get a list of strings . Group together the words that are…