Graph BFS / DFS/Medium
Number of IslandsPRO PASS
Time: O(M * N)Space: O(M * N)
Step 1: Setup & Initialization - Number of Islands
Flood-fill DFS/BFS to sink land cells.
Array Elements & Pointers
10
[0]20
[1]30
[2]40
[3]50
[4]Live Variables & Invariants
status:Initialized
pattern:Number of Islands
Step 1 / 333%
Solution Code
Custom Test Case Runner
Input your custom values and visualize step-by-step trace
Quick Presets:
AI DSA Coach
Contextual Tutor for Number of Islands
Hello! I am your AI DSA Tutor for **Number of Islands** (Graph BFS / DFS). Ask me anything about this algorithm, time complexity, or request a step hint!