787. Cheapest Flights Within K Stops | Dijkstras | BFS | Complete Internal Working

  Рет қаралды 3,697

Aryan Mittal

Aryan Mittal

Күн бұрын

Пікірлер: 30
@ARYANMITTAL
@ARYANMITTAL 9 ай бұрын
Sorry guys, video is a bit late today, it took some time to make notes for this one 🫡📝!!
@harshal8781
@harshal8781 9 ай бұрын
Kaar diya maaf 😅
@rajrajesh1669
@rajrajesh1669 9 ай бұрын
It's alright bro, we are always grateful for your work and contribution to the coding community...
@ARYANMITTAL
@ARYANMITTAL 9 ай бұрын
😂😂
@ARYANMITTAL
@ARYANMITTAL 9 ай бұрын
🫂🫂
@rajrajesh1669
@rajrajesh1669 9 ай бұрын
Man, There's no way this problem can actually be solved using dijkstra's algo😢... Such a beautiful explanation as gulab jamun for the dijkstra's algo approach. Thanks a lot... My only qtn rn is How did you came up with this solution bro?😂
@ARYANMITTAL
@ARYANMITTAL 9 ай бұрын
Glad you loved Rajesh ❤️❤️
@nikhilbabar2226
@nikhilbabar2226 9 ай бұрын
Great video !, one approach which I tried was dfs + dp
@gigachad2419
@gigachad2419 4 ай бұрын
TLE?
@WanderArc18
@WanderArc18 9 ай бұрын
8:49
@ARYANMITTAL
@ARYANMITTAL 9 ай бұрын
💀💀🌚😂
@varadv3
@varadv3 9 ай бұрын
8:50 "maksad nahi bhulna guys" 🤣
@fraserdab
@fraserdab 9 ай бұрын
If u said "smash the like button" at 35:40 then the like button would've glown, just a fun thing, thanks for the video
@ARYANMITTAL
@ARYANMITTAL 9 ай бұрын
Uff esaaa 🫠🫠❤️
@shashanksingh3008
@shashanksingh3008 5 ай бұрын
Dem how do you always know what I am gonna try and explain the correct way to overcome the problems i encountered after hours of head banging.
@ankitraheja9524
@ankitraheja9524 3 ай бұрын
What is the advantage of using PQ? Queue should have been enough. I ran the same program with PQ as well as Queue, did not find any difference in runtime. Can u please elaborate in this particular question what advantage PQ has brought? Thanks in Advance!!
@ABHAYKUMAR-kt3ug
@ABHAYKUMAR-kt3ug 9 ай бұрын
Aap pehle ki tarah video vale notes ki pdf description me daal diya karo plz
@Anonymous-lb6mc
@Anonymous-lb6mc 9 ай бұрын
Great !! Thanks man!!
@ARYANMITTAL
@ARYANMITTAL 9 ай бұрын
❤️❤️🤌🏻🫂
@sumitrajan9030
@sumitrajan9030 9 ай бұрын
No problem bro 🤜
@ARYANMITTAL
@ARYANMITTAL 9 ай бұрын
🫡🫡🫂
@hrithikkumar7974
@hrithikkumar7974 9 ай бұрын
why is the time complexity of bfs solution O(n+e.k)? if n=99 and k=100 then every node can be visited 2^(flights.size()) time right?
@krishnasharma657
@krishnasharma657 9 ай бұрын
Dijkstra gives tle 😅
@thetrueworld-q6m
@thetrueworld-q6m 2 ай бұрын
This problem is too tough for me :(
@chickukoshti3741
@chickukoshti3741 9 ай бұрын
not getting
@gourabchatterjee1778
@gourabchatterjee1778 9 ай бұрын
Just to mention your dijkstra's code is wrong..We cannot return distance when node==dst inside the loop....You messed up dijkstra's and bfs together
@ARYANMITTAL
@ARYANMITTAL 9 ай бұрын
Bro, I mentioned in video 6 times how it works, still you have a comment like this 🫠, and then people say, why i repeat stuff 🤣
@gourabchatterjee1778
@gourabchatterjee1778 9 ай бұрын
@@ARYANMITTAL Well you can actually repeat it for the 7th time but the code would still be wrong
@AkashKumar-bm4py
@AkashKumar-bm4py 9 ай бұрын
@@ARYANMITTAL Bro but it will search for other possible solutions as well ,which might be more optimum solution. In the example you just explored one path .
@shashanksingh3008
@shashanksingh3008 5 ай бұрын
@@gourabchatterjee1778 bro the code is completely right !! You can definitely return the distance because priority queue would have already set the lowest distance and lowest step which we actually want.
G-38. Cheapest Flights Within K Stops
23:56
take U forward
Рет қаралды 172 М.
How to Fight a Gross Man 😡
00:19
Alan Chikin Chow
Рет қаралды 17 МЛН
Noodles Eating Challenge, So Magical! So Much Fun#Funnyfamily #Partygames #Funny
00:33
When Cucumbers Meet PVC Pipe The Results Are Wild! 🤭
00:44
Crafty Buddy
Рет қаралды 60 МЛН
كم بصير عمركم عام ٢٠٢٥😍 #shorts #hasanandnour
00:27
hasan and nour shorts
Рет қаралды 11 МЛН
❌ Don't Run Behind 500 LEETCODE Problems ❌ Focus on QPCD
8:31
How I Mastered Data Structures and Algorithms in 8 Weeks
15:46
Aman Manazir
Рет қаралды 103 М.
Microservices Gone Wrong at DoorDash
17:22
NeetCodeIO
Рет қаралды 161 М.
3.6 Dijkstra Algorithm - Single Source Shortest Path - Greedy Method
18:35
I Solved 1583 Leetcode Questions  Here's What I Learned
20:37
ThePrimeTime
Рет қаралды 740 М.
Cheapest Flights Within K Stops | Graph | [CODE + Explaination] | Amazon | GFG 🔥
22:25
Yogesh & Shailesh (CodeLibrary)
Рет қаралды 14 М.
Why is everyone LYING?
7:56
NeetCodeIO
Рет қаралды 357 М.
How to Fight a Gross Man 😡
00:19
Alan Chikin Chow
Рет қаралды 17 МЛН