Solving Group Anagrams in Javascript. Please try yourself first to solve the problem and submit your implementation to LeetCode before looking into solution.

Problem Description

Given an array of strings, group anagrams together.

Example

Input: ["eat", "tea", "tan", "ate", "nat", "bat"],

Output

[
  ["ate","eat","tea"],
  ["nat","tan"],
  ["bat"]
]

Note:

  • All inputs will be in lowercase.
  • The order of your output does not matter.

See the full details of the problem Group Anagrams at LeetCode

Originally posted at: @github.com/ignacio-chiazzo/Algorithms-Leetcode-Javascript