FACEBOOK - WALLS AND GATES (LeetCode)
This is one of Facebook's most commonly asked interview questions according to LeetCode (2019)! Walls and Gates coding solution. If you give me 5 minutes you'll thank me if this appears during your Facebook interview! Coding Interviews Walls and Gates (LeetCode) question and explanation.
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: Facebook, Amazon, Microsoft, and Uber.
Link to problem: https://leetcode.com/problems/walls-and-gates/
Intuition behind solution: Iterate through the grid running a dfs on every single gate we encounter. During our dfs we stop if we have, gone out of the bounds of the grid, or if the cell we are currently on has a smaller distance than our current distance (this means there is another gate that is closer to it than the gate we are currently running a dfs on). Once we have finished iterating through the board we will have updated all reachable cells with their respective shortest distances to a gate.
SOCIAL
----------------------------------------------------------------------------------------------------------------
Support me on Patreon: https://www.patreon.com/KevinNaughtonJr
Follow me on Twitter: https://twitter.com/KevinNaughtonJr
Follow me on Instagram: https://instagram.com/kevinnaughtonjr/
Follow me on GitHub: https://github.com/kdn251
MUSIC
----------------------------------------------------------------------------------------------------------------
Muddy With My Buddy (Prod. Loud Lord) by 3T Brax
https://soundcloud.com/3tbrax/muddy-with-my-buddy
#coding #interviews #softwareengineering
Видео FACEBOOK - WALLS AND GATES (LeetCode) канала Kevin Naughton Jr.
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: Facebook, Amazon, Microsoft, and Uber.
Link to problem: https://leetcode.com/problems/walls-and-gates/
Intuition behind solution: Iterate through the grid running a dfs on every single gate we encounter. During our dfs we stop if we have, gone out of the bounds of the grid, or if the cell we are currently on has a smaller distance than our current distance (this means there is another gate that is closer to it than the gate we are currently running a dfs on). Once we have finished iterating through the board we will have updated all reachable cells with their respective shortest distances to a gate.
SOCIAL
----------------------------------------------------------------------------------------------------------------
Support me on Patreon: https://www.patreon.com/KevinNaughtonJr
Follow me on Twitter: https://twitter.com/KevinNaughtonJr
Follow me on Instagram: https://instagram.com/kevinnaughtonjr/
Follow me on GitHub: https://github.com/kdn251
MUSIC
----------------------------------------------------------------------------------------------------------------
Muddy With My Buddy (Prod. Loud Lord) by 3T Brax
https://soundcloud.com/3tbrax/muddy-with-my-buddy
#coding #interviews #softwareengineering
Видео FACEBOOK - WALLS AND GATES (LeetCode) канала Kevin Naughton Jr.
Показать
Комментарии отсутствуют
Информация о видео
Другие видео канала
FACEBOOK - VALID PALINDROME II (LeetCode)Walls and Gates - Multi-Source BFS - Leetcode 286 - PythonAMAZON CODING INTERVIEW QUESTION - COMBINATION SUM II (LeetCode)FACEBOOK - KTH SMALLEST ELEMENT IN A BST (LeetCode)FACEBOOK CODING INTERVIEW QUESTION - TASK SCHEDULER (LeetCode)AMAZON - MINIMUM COST TO CONNECT STICKS (LeetCode)AMAZON CODING INTERVIEW QUESTION - ROTTING ORANGESWhy You Should Not Learn to Code (as an ex-Google programmer)GOOGLE CODING INTERVIEW QUESTION - SHORTEST WAY TO FORM STRINGFACEBOOK CODING INTERVIEW QUESTION - MEETING ROOMS II (LeetCode)AMAZON CODING INTERVIEW QUESTION - REORGANIZE STRINGGOOGLE - COUNT PRIMES (LeetCode)AMAZON CODING INTERVIEW QUESTION - SUBSETS (LeetCode)AMAZON CODING INTERVIEW QUESTION - MERGE TWO SORTED LISTS (LeetCode)SOLVING MICROSOFT'S 2020 MOST ASKED INTERVIEW QUESTIONFACEBOOK - BINARY TREE RIGHT SIDE VIEW (LeetCode)Trie Data Structure Implementation (LeetCode)Why I joined Amazon (as a Software Engineer)How To Use LeetCode Effectively - Interview Prep Ep 43