MCPcopy Create free account
hub / github.com/betomoedano/JavaScript-Coding-Interview-Questions / number-of-islands.js

File number-of-islands.js

matrix/number-of-islands.js:None–None  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1// time O(wh) where w is the width of the grid and h the height
2// space O(n) where n is the number of items in our stack search
3function numIslands(grid) {
4 let numIslands = 0;

Callers

nothing calls this directly

Calls 1

numIslandsFunction · 0.85

Tested by

no test coverage detected