Learn
Practice
Newsletter
Resources
Mobile
New
F
Toggle theme
0
F
0
Toggle menu
Animations
← Back to All Animations
Group Anagrams
Bookmark
Input
Example 1
Example 2
Custom
strs
=
[eat, tea, tan, ate, nat, bat]
words
eat
tea
tan
ate
nat
bat
words
eat
tea
tan
ate
nat
bat
words
eat
tea
tan
ate
nat
bat
i
key =
{
a:1
e:1
t:1
}
words
eat
tea
tan
ate
nat
bat
i
groups
{a:1,e:1,t:1}
eat
words
eat
tea
tan
ate
nat
bat
i
key =
{
a:1
e:1
t:1
}
groups
{a:1,e:1,t:1}
eat
tea
words
eat
tea
tan
ate
nat
bat
i
key =
{
a:1
n:1
t:1
}
groups
{a:1,e:1,t:1}
eat
tea
{a:1,n:1,t:1}
words
eat
tea
tan
ate
nat
bat
i
key =
{
a:1
e:1
t:1
}
groups
{a:1,e:1,t:1}
eat
tea
{a:1,n:1,t:1}
tan
words
eat
tea
tan
ate
nat
bat
i
groups
{a:1,e:1,t:1}
eat
tea
ate
{a:1,n:1,t:1}
tan
words
eat
tea
tan
ate
nat
bat
i
key =
{
a:1
n:1
t:1
}
groups
{a:1,e:1,t:1}
eat
tea
ate
{a:1,n:1,t:1}
tan
nat
words
eat
tea
tan
ate
nat
bat
i
key =
{
a:1
b:1
t:1
}
groups
{a:1,e:1,t:1}
eat
tea
ate
{a:1,n:1,t:1}
tan
nat
words
eat
tea
tan
ate
nat
bat
groups
{a:1,e:1,t:1}
eat
tea
ate
{a:1,n:1,t:1}
tan
nat
{a:1,b:1,t:1}
bat
3 groups found
algo
master
.
io
Step:
Start: group words that are anagrams of each other
0 / 33
Input
Example 1
Example 2
Custom
strs
=
[eat, tea, tan, ate, nat, bat]
0 / 33
algo
master
.
io
Step:
Start: group words that are anagrams of each other