Learn
Practice
Interview
Resources
Newsletter
F
Toggle theme
0
F
0
Toggle menu
Animations
← Back to All Animations
Candy Crush
Bookmark
Boolean Marking
In-Place Negation
Input
Cascade
Run of 4 + T Shape
Single Crush
Already Stable
Custom
board
=
[[1,5,2],[2,1,3],[3,1,3],[4,1,2],[4,2,2],[4,3,1]]
START
BOOLEAN MARKING
1
5
2
2
1
3
3
1
3
4
1
2
4
2
2
4
3
1
MATCH WINDOW
flag matches in a side grid
PROGRESS
round 0
READY
marks this round: 0 crushed: 0
flag matches, then crush and drop
START
BOOLEAN MARKING
1
5
2
2
1
3
3
1
3
4
1
2
4
2
2
4
3
1
MATCH WINDOW
flag matches in a side grid
PROGRESS
round 0
READY
marks this round: 0 crushed: 0
flag matches, then crush and drop
ROUND 1
BOOLEAN MARKING
1
5
2
2
1
3
3
1
3
4
1
2
4
2
2
4
3
1
MATCH WINDOW
scanning rows...
PROGRESS
round 1
MARK ROWS
marks this round: 0 crushed: 0
round 1: scan rows for 3 in a row
ROUND 1
BOOLEAN MARKING
1
5
2
2
1
3
3
1
3
4
1
2
4
2
2
4
3
1
MATCH WINDOW
1
1
1
|1| = |1| = |1| = 1
mark all three to crush
PROGRESS
round 1
MARK COLS
marks this round: 1 crushed: 0
match found, flag to crush
ROUND 1
BOOLEAN MARKING
1
5
2
2
3
3
3
2
2
2
3
1
MATCH WINDOW
gravity pass
PROGRESS
round 1
CRUSH + DROP
marks this round: 2 crushed: 6
zero the 6 flagged cells
ROUND 1
BOOLEAN MARKING
1
5
2
2
3
3
3
2
2
2
3
1
MATCH WINDOW
gravity pass
PROGRESS
round 1
CRUSH + DROP
marks this round: 2 crushed: 6
column 1: survivors fall to the bottom
ROUND 2
BOOLEAN MARKING
1
5
2
2
3
3
3
2
2
2
3
1
MATCH WINDOW
scanning columns...
PROGRESS
round 2
MARK COLS
marks this round: 1 crushed: 6
round 2: scan columns for 3 in a column
ROUND 2
BOOLEAN MARKING
1
5
2
3
3
3
2
3
1
MATCH WINDOW
gravity pass
PROGRESS
round 2
CRUSH + DROP
marks this round: 1 crushed: 9
column 0: survivors fall to the bottom
ROUND 2
BOOLEAN MARKING
1
5
2
3
3
3
2
3
1
MATCH WINDOW
gravity pass
PROGRESS
round 2
CRUSH + DROP
marks this round: 1 crushed: 9
column 2: survivors fall to the bottom
ROUND 3
BOOLEAN MARKING
1
5
2
3
3
3
2
3
1
MATCH WINDOW
scanning columns...
PROGRESS
round 3
MARK COLS
marks this round: 0 crushed: 9
round 3: scan columns for 3 in a column
STABLE
BOOLEAN MARKING
1
5
2
3
3
3
2
3
1
MATCH WINDOW
flag matches in a side grid
PROGRESS
round 3
STABLE
marks this round: 0 crushed: 9
board is stable
algo
master
.
io
Step:
Start: crush all candies until the board is stable
0 / 19
Input
Cascade
Run of 4 + T Shape
Single Crush
Already Stable
Custom
board
=
[[1,5,2],[2,1,3],[3,1,3],[4,1,2],[4,2,2],[4,3,1]]
0 / 19
algo
master
.
io
Step:
Start: crush all candies until the board is stable