Course Hive
Search

Welcome

Sign in or create your account

Continue with Google
or
DSA with Python - Rotting Oranges | BFS Grid Traversal | Leetcode 994 - Part 122 [Hindi]
Play lesson

Data Structures and Algorithms with Python | Free DSA with Python Course - DSA with Python - Rotting Oranges | BFS Grid Traversal | Leetcode 994 - Part 122 [Hindi]

5.0 (2)
23 learners

What you'll learn

This course includes

  • 73.5 hours of video
  • Certificate of completion
  • Access on mobile and TV

Summary

Full Transcript

🚀 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

Course Hive

Continue this lesson in the app

Install CourseHive on Android or iOS to keep learning while you move.

Related Courses

FAQs

Course Hive
Download CourseHive
Keep learning anywhere