Загрузка страницы

GOOGLE - MAX AREA OF ISLAND (LeetCode)

One of Google's most commonly asked interview questions according to LeetCode! Give me 5 minutes and you'll thank me if you see this in your interview!

DISCORD CHANNEL
----------------------------------------------------------------------------------------------------------------
To join the Discord channel use the following link and join the "Member" tier: https://www.patreon.com/KevinNaughtonJr
In this Discord channel, you will be able to...
1. Ask me questions directly (as well as other members)
2. Ask about and discuss previous interview experiences
3. Find mock interview partners
4. Share helpful videos for interview preparation, and more!

This question is commonly asked by the following companies: Google, Facebook Microsoft, Amazon, Uber, DoorDash, Qualtrics, and Affirm .

Link to problem: https://leetcode.com/problems/max-area-of-island/

Intuition behind solution: Iterate through the entire matrix. Every time a 1 is encountered run a dfs sinking each cell's neighbors while counting the area. Update your maximum if the current island's area is greater than any other island's area you've encountered. When you've iterated through the entire matrix, return your max.

SOCIAL
----------------------------------------------------------------------------------------------------------------
Support me on Patreon: https://www.patreon.com/KevinNaughtonJr
Follow me on Twitter: https://twitter.com/KevinNaughtonJr
Follow me on Instagram: https://www.instagram.com/kevinnaughtonjr/
Follow me on GitHub: https://github.com/kdn251

MUSIC
----------------------------------------------------------------------------------------------------------------
Blushes by Dj Quads
https://soundcloud.com/aka-dj-quads/blushes

#coding #interviews #softwareengineering

Видео GOOGLE - MAX AREA OF ISLAND (LeetCode) канала Kevin Naughton Jr.
Показать
Комментарии отсутствуют
Введите заголовок:

Введите адрес ссылки:

Введите адрес видео с YouTube:

Зарегистрируйтесь или войдите с
Информация о видео
26 февраля 2019 г. 7:53:40
00:07:52
Яндекс.Метрика