Learn
Practice
Interview
Resources
Newsletter
F
Toggle theme
0
F
0
Toggle menu
Animations
← Back to All Animations
Group Shifted Strings
Bookmark
Brute Force
Difference Key
Input
Standard
All Same Group
Custom
strings
=
[abc, bcd, acef, xyz, az, ba, a, z]
strings
abc
bcd
acef
xyz
az
ba
a
z
strings
abc
bcd
acef
xyz
az
ba
a
z
strings
abc
bcd
acef
xyz
az
ba
a
z
i
now
rep
b
c
d
a
b
c
1
1
1
shift by 1 ✓
groups (↕ = representative)
↕ abc
abc
strings
abc
bcd
acef
xyz
az
ba
a
z
i
now
rep
a
c
e
f
a
b
c
different length
groups (↕ = representative)
↕ abc
abc
bcd
strings
abc
bcd
acef
xyz
az
ba
a
z
i
now
rep
x
y
z
a
b
c
23
23
23
shift by 23 ✓
groups (↕ = representative)
↕ abc
abc
bcd
xyz
↕ acef
acef
strings
abc
bcd
acef
xyz
az
ba
a
z
i
now
rep
a
z
a
c
e
f
different length
groups (↕ = representative)
↕ abc
abc
bcd
xyz
↕ acef
acef
strings
abc
bcd
acef
xyz
az
ba
a
z
i
now
rep
b
a
a
c
e
f
different length
groups (↕ = representative)
↕ abc
abc
bcd
xyz
↕ acef
acef
↕ az
az
strings
abc
bcd
acef
xyz
az
ba
a
z
i
groups (↕ = representative)
↕ abc
abc
bcd
xyz
↕ acef
acef
↕ az
az
ba
strings
abc
bcd
acef
xyz
az
ba
a
z
i
groups (↕ = representative)
↕ abc
abc
bcd
xyz
↕ acef
acef
↕ az
az
ba
↕ a
a
strings
abc
bcd
acef
xyz
az
ba
a
z
i
now
rep
z
a
c
e
f
different length
groups (↕ = representative)
↕ abc
abc
bcd
xyz
↕ acef
acef
↕ az
az
ba
↕ a
a
strings
abc
bcd
acef
xyz
az
ba
a
z
groups (↕ = representative)
↕ abc
abc
bcd
xyz
↕ acef
acef
↕ az
az
ba
↕ a
a
z
4 groups found
algo
master
.
io
Step:
Compare each string against a representative of every group
0 / 32
Input
Standard
All Same Group
Custom
strings
=
[abc, bcd, acef, xyz, az, ba, a, z]
0 / 32
algo
master
.
io
Step:
Compare each string against a representative of every group