Technical Interview Question: Number of Islands [LeetCode]
Автор: AlgosWithMichael
Загружено: 2018-01-21
Просмотров: 35170
Описание:
In this video, I explain the popular coding interview question Number of Islands.
🎧 Join the community Discord: / discord
💰 Support me on Patreon: / michaelmuinos
🔗Follow me on LinkedIn: / michael-muinos
📂Follow me on Github: https://github.com/MichaelMuinos
This problem is asked at Google, Amazon, Facebook, and many other companies.
The idea behind the algorithm is to use a DFS traversal to change all land to water. Each time we encounter land, we will tally up how many islands their are. This problem can be solved using a BFS or Union Find algorithm, but I find the Depth First Search solution the easiest to understand.
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: