Learn
Practice
Newsletter
Resources
Animations
New
F
Toggle theme
0
F
0
Toggle menu
← Back to All Animations
Remove Duplicate Letters
Bookmark
Input
Example 1
Example 2
Example 3
Custom
s
=
bcabc
b
c
a
b
c
0
1
2
3
4
stack = result so far
freq
b
0
c
0
a
0
algo
master
.
io
Step:
Build the smallest string with each letter once, keeping order.
0 / 22
Input
Example 1
Example 2
Example 3
Custom
s
=
bcabc
0 / 22
b
c
a
b
c
0
1
2
3
4
stack = result so far
freq
b
0
c
0
a
0
algo
master
.
io
Step:
Build the smallest string with each letter once, keeping order.