Which optimized pattern solves this lesson cleanly?
Practice this question from Flood Fill - Boundary DFS Pattern Practice Quiz, with options and an explanation.
Question
Which optimized pattern solves this lesson cleanly?
Option A — Correct answer
Boundary DFS from the start cell using the original color.
Option B
Nested loops without visited state
Option C
Two pointers on a sorted array
Option D
Character frequency counting only
Explanation
Boundary DFS from the start cell using the original color.