01 Matrix (LeetCode 542) | Solution using BFS and Dynamic Programming | 2 sweeps simplified

preview_player
Показать описание


Chapters:
00:00 - Intro
00:39 - Problem Statement
03:20 - A better test case
05:47 - Solution using BFS
11:27 - Dynamic Programming Solution
18:55 - Dry run of Code
20:31 - Final Thoughts

📚 Links to topics I talk about in the video:

📖 Reference Books:

🎥 My Recording Gear:

💻 Get Social 💻

#leetcode #programming #interview
Рекомендации по теме
Комментарии
Автор

Wow Man you deserve a million likes. Wonderful explanation. I was able to understand a dp question in just a single video

zubairzafar
Автор

Use res[i][j] = 10000; when initializing the result array if you can't submit it on LeetCode due to overflow issues.

rashwanth
Автор

Please continue system design, lld part

nikhil_squats
Автор

The dp approach was so interesting to watch. Is it fair to say that this iterative approach is a way of simulating breadth-first search without the need for a queue?

matthewzarate
Автор

Brother ur doing great. Keep on going like this Bro. Also learn some youtube tricks to accelerate and it will sum up like a bamboo tree getting its massive form after a long wait.

DASARIPOOJITHA-cuov
Автор

sir explanation and all is very good but explaining and writing dry code its really tough from ur videos..make it simpler code use the fundamental concepts..when ur writing code

yashuj
join shbcf.ru