Learn
Practice
Newsletter
Resources
Animations
New
F
Toggle theme
0
F
0
Toggle menu
← Back to All Animations
New 21 Game
Bookmark
Input
n=8, k=6, maxPts=4
n=21, k=17, maxPts=10
n=6, k=1, maxPts=10
n=10, k=1 (instant win)
Custom
n
=
8
,
k
=
6
,
maxPts
=
4
n=
8
k=
6
maxPts=
4
1
0
1
2
3
4
5
6
7
8
k = 6 · stop & win →
dp[i] = P(score lands exactly on i); the window sums the scores that can reach i
algo
master
.
io
Step:
New 21 Game: draw 1..4 points until score ≥ 6. Find P(final score ≤ 8).
0 / 25
Input
n=8, k=6, maxPts=4
n=21, k=17, maxPts=10
n=6, k=1, maxPts=10
n=10, k=1 (instant win)
Custom
n
=
8
,
k
=
6
,
maxPts
=
4
0 / 25
n=
8
k=
6
maxPts=
4
1
0
1
2
3
4
5
6
7
8
k = 6 · stop & win →
dp[i] = P(score lands exactly on i); the window sums the scores that can reach i
algo
master
.
io
Step:
New 21 Game: draw 1..4 points until score ≥ 6. Find P(final score ≤ 8).