Medium-EasyUnderstandGraphsMultiple Choice

Number of Islands (LC 200): what is the time and space complexity of the BFS approach?

Understand Tests comprehension and ability to explain concepts.

Answer Options

AO(m*n) time, O(1) space
BO(m*n) time, O(min(m,n)) space
CO(m*n) time, O(m*n) space
DO(m²*n²) time, O(m*n) space

Want to see the correct answer?

Get the answer with a detailed explanation, plus practice 33+ more Graphs questions with adaptive quizzes and timed interviews.

See the Answer on Guru Sishya →

This question is from the Graphs topic (Algorithms).

More Graphs Questions