Learn
Practice
Interview
Resources
Newsletter
F
Toggle theme
0
F
0
Toggle menu
Animations
← Back to All Animations
Guess Number Higher or Lower
Bookmark
Linear Scan
Binary Search
Input
Standard
Pick is 1
Pick is n
Small range
Custom
n
=
10
,
pick
=
6
0
1
2
3
4
5
6
7
8
9
1
2
3
4
5
6
7
8
9
10
0
1
2
3
4
5
6
7
8
9
1
2
3
4
5
6
7
8
9
10
guess(1) = 1 → too low
0
1
2
3
4
5
6
7
8
9
1
2
3
4
5
6
7
8
9
10
g
guess(2) = 1 → too low
0
1
2
3
4
5
6
7
8
9
1
2
3
4
5
6
7
8
9
10
g
guess(3) = 1 → too low
0
1
2
3
4
5
6
7
8
9
1
2
3
4
5
6
7
8
9
10
g
guess(4) = 1 → too low
0
1
2
3
4
5
6
7
8
9
1
2
3
4
5
6
7
8
9
10
g
guess(5) = 1 → too low
0
1
2
3
4
5
6
7
8
9
1
2
3
4
5
6
7
8
9
10
g
guess(6) = 0 → correct!
0
1
2
3
4
5
6
7
8
9
1
2
3
4
5
6
7
8
9
10
g
guess(6) = 0 → correct!
0
1
2
3
4
5
6
7
8
9
1
2
3
4
5
6
7
8
9
10
found
algo
master
.
io
Step:
Start: guess the number picked between 1 and 10
0 / 7
Input
Standard
Pick is 1
Pick is n
Small range
Custom
n
=
10
,
pick
=
6
0 / 7
algo
master
.
io
Step:
Start: guess the number picked between 1 and 10