DSA with Python - Rotting Oranges | BFS Grid Traversal | Leetcode 994 - Part 122 [Hindi]
🚀 Welcome to Part 122 of Code & Debug’s DSA Python Course 2025!
In this lecture, we solve Leetcode 994: Rotting Oranges, a popular grid-based problem using Multi-Source BFS. We simulate the rotting process minute-by-minute while spreading the rot to adjacent fresh oranges.
📚 What you’ll learn in this video:
✅ Understanding the grid structure and orange states
✅ What is Multi-Source BFS and why it’s perfect for this problem
✅ BFS traversal with (i, j) → (i±1, j±1) 4-directional movement
✅ Keeping track of fresh orange count and time (minutes)
✅ Handling edge cases and when to return -1
💡 Why is this important?
This problem is widely asked in interviews to test BFS traversal in 2D matrices, especially multi-point propagation problems like infection spread, water fill, and shortest distance to resources.
👉 Practice the problem on Leetcode:
🔗 https://leetcode.com/problems/rotting-oranges/
👉 Refer to the article for better understanding:
📌 https://codeanddebug.in/blog/rotting-oranges-leetcode-994/
👉 📄 Access the full YouTube DSA Playlist Sheet (All Questions in Order):
🔗 https://docs.google.com/spreadsheets/d/1AWE15Fy3wD2iqu2vjK_R7cCiuvSsjYQclcdZmHpF66o/edit?usp=sharing
👉 Enroll in this FREE DSA Python course here:
🔗 https://codeanddebug.in/course/master-dsa-with-leetcode
👉 Enroll for Self-Paced Advanced DSA course here:
🔗 https://codeanddebug.in/course/zero-to-hero-python-dsa
🙏 Thank you for supporting Code & Debug! Don’t forget to like, share, and subscribe to our channel. Hit the 🔔 bell icon to stay updated with our latest lectures.
#RottingOranges #GridBFS #MultiSourceBFS #Leetcode994 #MatrixTraversal #PythonDSA #DSAPythonCourse #CodeAndDebug #DSA2025 #CodingInterviews #Part122
Видео DSA with Python - Rotting Oranges | BFS Grid Traversal | Leetcode 994 - Part 122 [Hindi] канала Code and Debug
In this lecture, we solve Leetcode 994: Rotting Oranges, a popular grid-based problem using Multi-Source BFS. We simulate the rotting process minute-by-minute while spreading the rot to adjacent fresh oranges.
📚 What you’ll learn in this video:
✅ Understanding the grid structure and orange states
✅ What is Multi-Source BFS and why it’s perfect for this problem
✅ BFS traversal with (i, j) → (i±1, j±1) 4-directional movement
✅ Keeping track of fresh orange count and time (minutes)
✅ Handling edge cases and when to return -1
💡 Why is this important?
This problem is widely asked in interviews to test BFS traversal in 2D matrices, especially multi-point propagation problems like infection spread, water fill, and shortest distance to resources.
👉 Practice the problem on Leetcode:
🔗 https://leetcode.com/problems/rotting-oranges/
👉 Refer to the article for better understanding:
📌 https://codeanddebug.in/blog/rotting-oranges-leetcode-994/
👉 📄 Access the full YouTube DSA Playlist Sheet (All Questions in Order):
🔗 https://docs.google.com/spreadsheets/d/1AWE15Fy3wD2iqu2vjK_R7cCiuvSsjYQclcdZmHpF66o/edit?usp=sharing
👉 Enroll in this FREE DSA Python course here:
🔗 https://codeanddebug.in/course/master-dsa-with-leetcode
👉 Enroll for Self-Paced Advanced DSA course here:
🔗 https://codeanddebug.in/course/zero-to-hero-python-dsa
🙏 Thank you for supporting Code & Debug! Don’t forget to like, share, and subscribe to our channel. Hit the 🔔 bell icon to stay updated with our latest lectures.
#RottingOranges #GridBFS #MultiSourceBFS #Leetcode994 #MatrixTraversal #PythonDSA #DSAPythonCourse #CodeAndDebug #DSA2025 #CodingInterviews #Part122
Видео DSA with Python - Rotting Oranges | BFS Grid Traversal | Leetcode 994 - Part 122 [Hindi] канала Code and Debug
Комментарии отсутствуют
Информация о видео
23 мая 2025 г. 18:22:56
00:29:28
Другие видео канала