Programming Tech Brief By HackerNoon

This story was originally published on HackerNoon at: https://hackernoon.com/how-to-solve-number-of-islands-from-blind-75-leetcode-questions.
We will learn how to solve "Number of Islands" from Blind 75 LeetCode Questions.
Check more stories related to programming at: https://hackernoon.com/c/programming. You can also check exclusive content about #java, #data-structures, #leetcode, #algorithms, #dfs, #programming, #java-programming, #learn-programming, #hackernoon-es, and more.

This story was written by: @rakhmedovrs. Learn more about this writer by checking @rakhmedovrs's about page, and for more stories, please visit hackernoon.com.

Given an m x n 2D binary grid which represents a map of '1's (land) and '0's (water), return the number of islands. An island is surrounded by water and is formed by connecting adjacent lands horizontally or vertically. You may assume all four edges of the grid are surrounded by water.

What is Programming Tech Brief By HackerNoon?

Learn the latest programming updates in the tech world.