ycliper

Популярное

Музыка Кино и Анимация Автомобили Животные Спорт Путешествия Игры Юмор

Интересные видео

2025 Сериалы Трейлеры Новости Как сделать Видеоуроки Diy своими руками

Топ запросов

смотреть а4 schoolboy runaway турецкий сериал смотреть мультфильмы эдисон
Скачать

Google Coding Question - Making a Large Island (Hard)

Автор: AlgosWithMichael

Загружено: 2020-04-16

Просмотров: 18134

Описание: Here is a step by step explanation of a Google coding question involving DFS/BFS rated as hard!

Check out my interview prep platform for learning the patterns!
📢 Interview Prep Platform: https://algoswithmichael.com

►Number of Islands Explanation Video:    • Technical Interview Question: Number of Is...  `
🎧 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 is another video explanation going over the infamous "island" problems called "Making a Large Island". This problem is asked at Google and involves the use of a Breadth-First Search OR Depth-First Search. This problem is rated as "hard".

To solve this problem, we must first loop over our initial 2D matrix filled with 0's (water) and 1's (land). We keep track of the groupings of islands using an 'islandId' in order to label the appropriate sizes of the islands. We then save these island id's inside of map and tie the island size to it.

Once we are finished tallying up all of the sizes of the islands inside of the map, we can now iterate over our 2D matrix again, but this time checking all neighbors around only 0's to determine if changing it to a 1 will allow for a larger island size.

The time and space complexity for our solution is O(N^2) where N is the number of elements we have in our 2D matrix.

Не удается загрузить Youtube-плеер. Проверьте блокировку Youtube в вашей сети.
Повторяем попытку...
Google Coding Question - Making a Large Island (Hard)

Поделиться в:

Доступные форматы для скачивания:

Скачать видео

  • Информация по загрузке:

Скачать аудио

Похожие видео

Text Justification Algorithm (LeetCode)

Text Justification Algorithm (LeetCode)

Google Coding Interview Question - Number of Closed Islands (LeetCode)

Google Coding Interview Question - Number of Closed Islands (LeetCode)

Интервью по программированию Google со старшеклассником

Интервью по программированию Google со старшеклассником

Longest Increasing Path in a Matrix (DFS + Memoization)

Longest Increasing Path in a Matrix (DFS + Memoization)

Bucket Sort Interview Question - Min Time Difference (Amazon)

Bucket Sort Interview Question - Min Time Difference (Amazon)

Вопрос на собеседовании по программированию Amazon — первый пропущенный положительный ответ (Leet...

Вопрос на собеседовании по программированию Amazon — первый пропущенный положительный ответ (Leet...

Making A Large Island - Leetcode 827 - Python

Making A Large Island - Leetcode 827 - Python

Алгоритмы и структуры данных ФУНДАМЕНТАЛЬНЫЙ КУРС от А до Я. Графы, деревья, хеш таблицы и тд

Алгоритмы и структуры данных ФУНДАМЕНТАЛЬНЫЙ КУРС от А до Я. Графы, деревья, хеш таблицы и тд

Вопрос для собеседования по программированию Amazon: количество отдельных островов

Вопрос для собеседования по программированию Amazon: количество отдельных островов

Microsoft Coding Interview Question - Rotate Image

Microsoft Coding Interview Question - Rotate Image

Чем ОПАСЕН МАХ? Разбор приложения специалистом по кибер безопасности

Чем ОПАСЕН МАХ? Разбор приложения специалистом по кибер безопасности

FAANG Coding Interview Question - Container With Most Water (LeetCode)

FAANG Coding Interview Question - Container With Most Water (LeetCode)

Но почему площадь поверхности сферы в четыре раза больше ее тени?

Но почему площадь поверхности сферы в четыре раза больше ее тени?

MAKING A LARGE ISLAND | LEETCODE # 827 | PYTHON SOLUTION

MAKING A LARGE ISLAND | LEETCODE # 827 | PYTHON SOLUTION

Секретные технологии боулинга [Veritasium]

Секретные технологии боулинга [Veritasium]

Union Find Data Structure - Number of Connected Components in an Undirected Graph (LeetCode)

Union Find Data Structure - Number of Connected Components in an Undirected Graph (LeetCode)

Почему простые числа образуют эти спирали? | Теорема Дирихле и пи-аппроксимации

Почему простые числа образуют эти спирали? | Теорема Дирихле и пи-аппроксимации

Solving Amazon's 2024 Most Asked Coding Question

Solving Amazon's 2024 Most Asked Coding Question

Основы ПЛК: релейная логика

Основы ПЛК: релейная логика

G-52. Making a Large Island - DSU

G-52. Making a Large Island - DSU

© 2025 ycliper. Все права защищены.



  • Контакты
  • О нас
  • Политика конфиденциальности



Контакты для правообладателей: [email protected]