Which edge case matters for this problem?

Practice this question from Number of Islands - Grid DFS Pattern Practice Quiz, with options and an explanation.

Question

Which edge case matters for this problem?

Option A — Correct answer

Diagonal land should not be counted as connected.

Option B

Negative stock prices

Option C

Uppercase vowels only

Option D

A rotated sorted array

Explanation

Diagonal land should not be counted as connected.

Number of Islands - Grid DFS Pattern Practice Quiz

All questions · Previous question

Open on QuizMaker