Рет қаралды 6,192
In this video we are solving a very tricky Google interview question dealing with traversing a 2D matrix: Shortest Distance From All Buildings (Leetcode 317).
This question follows a familiar BFS solution pattern but implementing it is very tricky and we have to be very careful to get the details right because otherwise our solution won't work.
TIMESTAMPS:
00:00 Intro
00:21 Question Prompt
01:10 Example & Solution Intuition
09:36 Coding
20:00 Time/Space Complexity
22:00 Outro