Back to Browse

Number of Islands | LeetCode 200 | Programming Tutorials

4.7K views
Apr 17, 2020
9:54

In this tutorial, I have explained Number of Islands LeetCode solution using Java. How to count number of islands using DFS (Depth First Search). Number of Islands BFS Approach - https://youtu.be/S1u806G_JuE Number of Islands Java Code - https://webrewrite.com/number-of-islands/ LeetCode 30 Day Challenge PlayList - https://www.youtube.com/watch?v=-I1pUv57WG8&list=PLUg9hRlm7gxT8mrwa_648iC8Ah42E0W1o Given a 2d grid map of '1's (land) and '0's (water), count 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 all surrounded by water. In this tutorial, I have discussed how we can solve this problem using DFS. This problem is the day 17 challenge of LeetCode 30 day challenge. Website - https://webrewrite.com/ Paypal - https://www.paypal.me/programmingtutorials

Download

0 formats

No download links available.

Number of Islands | LeetCode 200 | Programming Tutorials | NatokHD