Rotting Oranges Leetcode solution | BFS ✅ Graph Explained Hindi | Complete Graph Playlist
Vložit
- čas přidán 9. 02. 2022
- This is the video under the series of DATA STRUCTURE & ALGORITHM in a GRAPH Playlist. Now we are going to solve the Rotting Oranges | Graph series
Join My Telegram channel for more Updates: telegram.me/helloworldbyprince
complete DSA preparation: github.com/Prince-1501/Comple...
----------------------------------------------------------------------------------------
Rotting Oranges: leetcode.com/problems/rotting...
code in this video: github.com/Prince-1501/Hello_...
----------------------------------------------------------------------------------------
*Follow me *
LinkedIn► / iamprince
Facebook► / helloworldofficials
Instagram► / helloworldbyprince
Twitter► / prince_king_
Telegram► telegram.me/helloworldbyprince
----------------------------------------------------------------------------------------
►Our Playlists on:-
► Tree: • Tree Data Structure & ...
► Hashing: • Hashing Data Structure...
► Graph: • Graph Data Structure &...
► Matrix: • Matrix (Multidimension...
► STL: • Standard Template Libr...
► Leetcode: • LeetCode Solutions And...
►Competitive Programming: • Full course in Competi...
►C++ Full Course : • C++ full Course in HINDI
►Algorithms: • L-01 || Prefix Sum Arr...
►Data Structure: • Data Structures with C...
------------------------------------------------------------------------
🌟 Please leave a LIKE ❤️ and SUBSCRIBE for more AMAZING content! 🌟
✨ Tags ✨
Introduction to the graph data structure
Graph playlist Hello world
Shortest Path in Unweighted Graph
Print all paths from a given source to a destination
Depth First Search
Graph hello world
Types of graphs in Data structure & algorithms
DFS Graph
playlist Graph Hindi
Max Area of Island
Maximum Area of Island
question asked in Google
off-campus placement
how to learn to code for beginners
Practice Tree data structure
Unit Area of the largest region of 1's
The graph in a data structure in Hindi
Graph Full playlist for Beginners
algorithms
graph
Find the length of the largest region
data structure
sorting algorithms
algorithm analysis
Rotting Oranges
gate computer science preparation
programming languages
#Graph #Leetcode #programming
ur way of explanation is ooooooooooooooooooooossssmmmmm!!!!!!!
Thanks a lot sajid
Bhaiya why are we using 2 nested while loops. I think this can be done in one as well.
Great work bhaiya, hope ur video will be in trending soon❤️
I wish the same bro
Sir this question is very similar to minimum time to burn tree
Turant concept pakad mai aa gaya
Yess true
Actually we don't need the last loop to check if fresh oranges are left. when oranges are rotting inside the while(q is not empty) loop we can just decrease fresh and check at the end if fresh==0 if 0
return time else return -1
int orangesRotting(vector& grid) {
int t=0;
int num=0;
queueq;
for(int i=0;i
Amazing 🔥
Thank you so much bhaiya...
Great vid!😀
Most welcome 😊
Keep up the great work within few months u will be getting lot of views
Thanks brother 😊
I always felt so much fear from Graph . Your playlist is very good . Please make more vides on other topics also
Sure I will
Great explanation, understood everything
Amazing brother
Bahut achha sir
Thanks Aniket
Pura clear crystal sir mza aa gya...👏👏👏
Fantastic sir
waoo good job
Best explanation
Bhaiya solved this problem without watching ur video🤗....ThankYou bhaiya for this great playlist💯
Most welcome 😊
NICE explaining..... PRINCE SIR
Thanks for learning Please, share this channel in your college, groups, or LinkedIn bcoz it's cost nothing to you 😀
Great Explanation ❤️
Thank you! 🙂
ThankYou
You're welcome
great help for us bro
It's my pleasure Please, share this channel in your college, groups, or LinkedIn bcoz it's cost nothing to you 😀
🤩
Great Explai....
Glad you liked it! Please, share this channel in your college, groups, or LinkedIn bcoz it's cost nothing to you 😀
Able to do it by myself bhaiya❤
nice yaar
clean and crisp explaination ,thnks
Thanks, Isha, so nice of u
Please, if possible then share this channel in your college, groups, or LinkedIn bcoz it's cost nothing to you 😀
nice
Thanks a lot
nice explained
Thanks for the support 😊
can anybody tell me why we are using double while loop here 🤔🤔
thanks sir
So nice of you
bhiya actually can we say that we are counting the maximum height in a graph with multiple number of entry point
yes u right
BFS traversal will use
--------------------------------------------------------CODE------------------------------------------------------
class Solution {
public:
bool isValid(int i, int j, int m, int n, vector& grid)
{
if(i>=0 && i=0 && j
good work Vishal
@@HelloWorldbyprince Thank u bhaiya...keep doing it.
4:03 kuki ye apne adjecent ko rott krr rha h islie ...... mene aage dekhi nahi usse pehle krra hu to batan shi h ???
shi hai
can we do this using DFS (rec)?
yess offcourse
gre88👍
Thanks Please, if possible then share this channel in your college, groups, or LinkedIn bcoz it's cost nothing to you 😀
Bhaiya sab kuch samajh me aaya but wo time minimum time kaise hua samajh mein nahi aaya...
Hi bhaiya
Why have you used 2 while loops in bfs?
The first one is till the queue becomes empty and the second one is also for the same I guess.
Pls help
Feeling BFS
yessssss
Bhaiya achha nahi bahut achha laga
🔥
14:24 sir ye [0] kyu likha
got it
bfs
thanks a lot
BFS
Nice
log concept dekh ke isliye chale jate hai kyuki unko khud se try krna hota hai code krna.. mai bhi yahi krta hun mai try krta hu ki khud se code likh payu.
Amazing bro ...keep learning
24/32 done
Good bro
Bfs
yup
Bhaiya why are we using 2 nested while loops. I think this can be done in one as well.
bfs
nice
BFS
yessssss
Bhaiya why are we using 2 nested while loops. I think this can be done in one as well.