Популярное

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

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

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

Топ запросов

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

Google Coding Question - Making a Large Island (Hard)

Автор: AlgosWithMichael

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

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

Описание:

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.

Google Coding Question - Making a Large Island (Hard)

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

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

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

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

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

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

Text Justification Algorithm (LeetCode)

Text Justification Algorithm (LeetCode)

Longest Increasing Path in a Matrix (DFS + Memoization)

Longest Increasing Path in a Matrix (DFS + Memoization)

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

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

Bucket Sort Interview Question - Min Time Difference (Amazon)

Bucket Sort Interview Question - Min Time Difference (Amazon)

Decode String | FAANG Coding Question | Stack

Decode String | FAANG Coding Question | Stack

Но что такое нейронная сеть? | Глава 1. Глубокое обучение

Но что такое нейронная сеть? | Глава 1. Глубокое обучение

Как взломать любое программное обеспечение

Как взломать любое программное обеспечение

Вопрос на собеседовании по программированию Google — Путь с максимальным золотом (LeetCode)

Вопрос на собеседовании по программированию Google — Путь с максимальным золотом (LeetCode)

Декораторы Python — наглядное объяснение

Декораторы Python — наглядное объяснение

Самые стыдные вопросы об электричестве!

Самые стыдные вопросы об электричестве!

Microsoft Coding Interview Question - Rotate Image

Microsoft Coding Interview Question - Rotate Image

Интервью по проектированию системы Google: Design Spotify (с бывшим менеджером по маркетингу Google)

Интервью по проектированию системы Google: Design Spotify (с бывшим менеджером по маркетингу Google)

КАК УСТРОЕН TCP/IP?

КАК УСТРОЕН TCP/IP?

Merge K Sorted Lists - Divide and Conquer Approach

Merge K Sorted Lists - Divide and Conquer Approach

Как учиться быстро и самому? На примере языков  программирования.

Как учиться быстро и самому? На примере языков программирования.

LLM и GPT - как работают большие языковые модели? Визуальное введение в трансформеры

LLM и GPT - как работают большие языковые модели? Визуальное введение в трансформеры

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

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

ООП На Простых Примерах | Объектно-Ориентированное Программирование

ООП На Простых Примерах | Объектно-Ориентированное Программирование

Вопрос по Google Coding — Длительное нажатие имени (подход с двумя указателями)

Вопрос по Google Coding — Длительное нажатие имени (подход с двумя указателями)

Каково это — изобретать математику?

Каково это — изобретать математику?

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



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



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