intermediate
Challenge: count the islands
Implement this from the stub. Hidden tests grade the behaviour you write, not the comments you leave.
Challenge: Count the Islands
export function countIslands(grid: string[][]): number {
// Your implementation here
}challenge — implement from scratchCtrl+↵ submits · Ctrl+Shift+↵ runsstarter code