Skip to content
TryAlgoViz
Algorithms
Articles
CS Fundamentals
Problems
Roadmap
Dashboard
Theme
Group Anagrams — TryAlgoViz
Group Anagrams
medium
Visualize
Description
Hints
Discussion
Visual examples
Example 1
Input
eat
0
tea
1
tan
2
ate
3
nat
4
bat
5
Output
[["eat","tea","ate"],["tan","nat"],["bat"]]
Example 2
Input
0
Output
[[""]]
Example 3
Input
a
0
Output
[["a"]]
Python
Reset
Run
Ctrl+Enter
Loading editor…
Test Case 1
Test Case 2
Test Case 3
Input
eat
0
tea
1
tan
2
ate
3
nat
4
bat
5
Expected Output
[["eat","tea","ate"],["tan","nat"],["bat"]]