Learn
Practice
Interview
Resources
Newsletter
F
Toggle theme
0
F
0
Toggle menu
Animations
← Back to All Animations
Find Smallest Letter Greater Than Target
Bookmark
Linear Scan
Binary Search
Input
Standard
Wrap around
Middle
All same
Custom
letters
=
[c, f, j]
,
target
=
a
target = 'a'
0
1
2
'c'
'f'
'j'
target = 'a'
0
1
2
'c'
'f'
'j'
target = 'a'
0
1
2
'c'
'f'
'j'
i
target = 'a'
0
1
2
'c'
'f'
'j'
result
algo
master
.
io
Step:
Start: find the smallest letter greater than target 'a'
0 / 2
Input
Standard
Wrap around
Middle
All same
Custom
letters
=
[c, f, j]
,
target
=
a
0 / 2
algo
master
.
io
Step:
Start: find the smallest letter greater than target 'a'