Guided lesson

Flood Fill

Matrices

See the input

Beginner

Input for Flood Fill: Starting from one cell, visit connected cells with the same value and recolor them.

0,0
0,1
0,2
0,3
1,0
1,1
1,2
1,3
2,0
2,1
2,2
2,3
3,0
3,1
3,2
3,3
Step 1 O(R*C) time - O(R*C) space
Guided progression
6% lesson
Step 1 / 2Learner goal
Speech settings Speed 1.0 · Volume 90%

Keyboard: Space play/pause · Arrow keys step · Page Up/Down change sections · R restart