What is the main signal for Grid BFS: Multi-source Distance Problems?

Practice this question from Quiz: Grid BFS: Multi-source Distance Problems, with options and an explanation.

Question

What is the main signal for Grid BFS: Multi-source Distance Problems?

Option A — Correct answer

Many cells spread simultaneously or every cell needs distance to the nearest source.

Option B

The input has no constraints.

Option C

The sample output is small.

Option D

The question uses only one variable.

Explanation

Pattern choice starts from constraints and invariant.

Quiz: Grid BFS: Multi-source Distance Problems

All questions · Next question

Open on QuizMaker