Тёмный

Graph Data Structure 4. Dijkstra’s Shortest Path Algorithm 

Computer Science
Подписаться 210 тыс.
Просмотров 1,5 млн
50% 1

This is the fourth in a series of computer science videos about the graph data structure. This is an explanation of Dijkstra’s algorithm for finding the shortest path between one vertex in a graph and another. Indeed, this explains how Dijkstra’s shortest path algorithm generates a set of information that includes the shortest paths from a starting vertex and every other vertex in the graph. It also mentions why Dijkstra’s shortest path algorithm is an example of a greedy algorithm.

Опубликовано:

 

9 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 816   
@assansanogo1343
@assansanogo1343 7 лет назад
FINALLY SOME CLEAR STUFF. almost crying
@OscarSotomayor
@OscarSotomayor 7 лет назад
jaja...you made my day
@MinecraftLetstime
@MinecraftLetstime 6 лет назад
Me too!!
@SkyWalker9669
@SkyWalker9669 4 года назад
said what i wanna say
@exactzero
@exactzero 4 года назад
HAHAHAHAHA
@veggieblues
@veggieblues 3 года назад
mood
@daringdarius5686
@daringdarius5686 4 года назад
I don't know if you know this, and this is 4 years late, but this is one of the cleanest, easiest to understand video's (conceptually-wise) for Dijkstra's. I've seen several, but this! This is the best one. :)
@ComputerScienceLessons
@ComputerScienceLessons 4 года назад
Great to hear! :)KD
@vijayalakshmi0714
@vijayalakshmi0714 2 года назад
@@ComputerScienceLessons lol, but i'm listening even now, best explanation. Keep it up
@eatbreathedatascience9593
@eatbreathedatascience9593 2 года назад
I agree fully. Best !
@tudorradu5848
@tudorradu5848 Год назад
@@ComputerScienceLessons He's right! It was veryyy easy to understand. Thank you
@555aboud
@555aboud 5 месяцев назад
stunning, clear explanation. Thank you so much!!!
@SouravendraKrishnaDeb
@SouravendraKrishnaDeb 4 года назад
We won't be visiting A, again. Me: CRIES LOUDLY
@ComputerScienceLessons
@ComputerScienceLessons 4 года назад
A was no fun. :) KD
@ashutoshthite
@ashutoshthite 3 года назад
🦍🦍😂😂
@trulyharsh
@trulyharsh 3 года назад
Wiz Khalifa's "See You Again" Plays in The Background
@user-wq2iv3cq2h
@user-wq2iv3cq2h 3 года назад
i laughed hard reading this
@royazut550
@royazut550 7 лет назад
!!!finally a good and simple explanation oh tears of joy... may the gods bless you with bugless codes
@neelparekh9846
@neelparekh9846 4 года назад
"May the gods bless you with bug-less codes." I'm going to use that a lot.
@neptechbyte
@neptechbyte 3 года назад
haha epic comment bro
@faisalsal1
@faisalsal1 2 года назад
This video is your shortest path to learn Dijkstra Algorithm.
@ComputerScienceLessons
@ComputerScienceLessons 2 года назад
🤡 :)KD
@reiniervanleeuwen9815
@reiniervanleeuwen9815 5 лет назад
This has to be the best explanation of Dijkstra's Shortest Path algorithm... Thanks a lot!
@adityapappu4963
@adityapappu4963 4 года назад
This is literally one of the cleanest, simplest, no-nonsense beautiful explanations of an algorithm I have ever watched on RU-vid. Amazing. To-the-point. Crisp. And so easy to understand and digest. THANK YOU.
@hadeneh
@hadeneh 6 лет назад
I signed in just to like this video.
@magicianwizard4294
@magicianwizard4294 4 года назад
and to comment apparently
@hariprasathgcse3381
@hariprasathgcse3381 Год назад
U r loyal
@ComputerScienceLessons
@ComputerScienceLessons 7 лет назад
Hi FTP My scenario is for a non-directed graph (you can go backwards and forwards on any edge), so all the nodes can indeed be reached. However, for a directed graph, some nodes may be unreachable from the given start, as you have intimated. Dijkstra's algorithm finds the shortest paths only to the nodes that can be reached from the starting node. (if there is no path to a node from the start, it's irrelevant). The loop will end when all 'reachable' vertices have been visited. By the way, Dijkstra's algorithm doesn't work if the graph edges have negative weights.
@amine_fadssi
@amine_fadssi Год назад
The best video on the internet explaining the Dijkstra’s algorithm, thanks a lot sir.
@ComputerScienceLessons
@ComputerScienceLessons Год назад
You're welcome :)KD
@TANEM315
@TANEM315 7 лет назад
You sir are BY FAR the BEST teacher of algorithms on RU-vid or anywhere else I've seen algorithm lectures. THANK YOU FOR POSTING THIS! With your well-paced, methodical style you could probably teach anything!!!!
@mikefriedman9573
@mikefriedman9573 5 лет назад
Absolutely the best explanation. Cleared up any and all lingering questions in my mind.
@matthewsattam1982
@matthewsattam1982 7 лет назад
Extremely clear, extremely well put together visually. Well done, and thank you.
@ComputerScienceLessons
@ComputerScienceLessons 7 лет назад
I really appreciate your comment. Thanks.
@trellas3689
@trellas3689 8 месяцев назад
extremely
@Jbbubanic5434
@Jbbubanic5434 Год назад
I can't believe how well done this video was made. I appreciate your hard work at a visual representation of this algorithm.
@johnstorm589
@johnstorm589 Год назад
Even 6 years later, this is still the best explanation ever
@lewistian7975
@lewistian7975 5 лет назад
BEST explanation of Dijkstra's algorithm EVER!
@jackych5055
@jackych5055 3 года назад
man this Dijkstra guy deserved a nobel prize for it
@ComputerScienceLessons
@ComputerScienceLessons 3 года назад
He was a clever chap! :)KD
@Satharus
@Satharus 5 лет назад
Thank you! This is the single best video explaining the algorithm on RU-vid.
@mikelanigan9601
@mikelanigan9601 5 лет назад
I must commend the quality and clarity of this video: it is by far the best video I've seen on RU-vid to date on the subject of explaining Dijkstra's Algorithm. There are so many other videos that do not deal with the problem of keep a record of the shortest route sufficiently systematically enough, in my opinion. This video is systematic, showing the use of a table to perform the algorithm very clearly. Instruction of this level is not accidental; my congratulations to those involved in its production and execution. You have done the domain of Computer Science the world of good. Keep up the great work!
@ComputerScienceLessons
@ComputerScienceLessons 5 лет назад
Thanks for the great comment Mike.
@timuralmamedov1900
@timuralmamedov1900 6 лет назад
Great explanation! Finally, I understood it. The table really helps to not get lost. Thank you so much!
@young-julee7899
@young-julee7899 7 лет назад
D E A D
@ComputerScienceLessons
@ComputerScienceLessons 7 лет назад
Accidental!
@yunyizhu8358
@yunyizhu8358 5 лет назад
kinda scary when it turns red lol
@MarkTheMadMan
@MarkTheMadMan 5 лет назад
haha i saw this instantly, maybe its a sign :/
@celsiusfahrenheit1176
@celsiusfahrenheit1176 3 года назад
(ʘᗩʘ')
@iansugg3496
@iansugg3496 3 года назад
Me after my Data Structures and Algorithms final exam
@Museko
@Museko 7 лет назад
I'm watching a bunch of your videos to review for my Algorithms exam. Thanks a bunch for making these!
@ComputerScienceLessons
@ComputerScienceLessons 7 лет назад
Thanks for the comment. It's good to hear you're finding them useful. :)
@MinecraftLetstime
@MinecraftLetstime 6 лет назад
By far the best video for explaining this algorithm! Perfect.
@SpaceDisco1
@SpaceDisco1 5 лет назад
It's really interesting, how sometimes one thorough example can clear up everything.
@taruchitgoyal3735
@taruchitgoyal3735 9 месяцев назад
I haven't found a better tutorial than this for understanding and computing distances using Dijkstra's algorithm. Thank you so much.
@ComputerScienceLessons
@ComputerScienceLessons 8 месяцев назад
You are most welcome :)KD
@5he1tied
@5he1tied 5 лет назад
This is the fourth video I had to watch. Only one that explains clearly, thanks.
@markh1791
@markh1791 2 года назад
The clearest, and most succinct, explanation of Dijkstra's algo I've seen. Thanks!
@tundet8963
@tundet8963 7 лет назад
Excellent work, Clarity, and explanation at all stages. Thanks, keep up the good work
@tumarisyalqun7327
@tumarisyalqun7327 5 лет назад
This is so far the best explanation I have seen, thank you so much!
@jacklimestone2559
@jacklimestone2559 5 лет назад
Thank you! This really helped me out with my assignment! Nice accent, clear explanation, and visually pleasing.
@alpharussel653
@alpharussel653 2 года назад
An entire computer science degree courses embedded in this amazing channel. Thank you. Not all heroes wear a cap.
@dimensionalblade2778
@dimensionalblade2778 3 года назад
Damn such a nice tutorial. Also you're making stuffs for VB, you're like the dream channel I've been searching.
@ronglass5968
@ronglass5968 3 года назад
The VERY clearest and well-paced explanation by far! Thanks!
@ComputerScienceLessons
@ComputerScienceLessons 3 года назад
You are too kind :)KD
@tartarus1322
@tartarus1322 4 года назад
I wish I could upvote this more than once. It is honestly a brilliant, clear, and concise explanation
@ComputerScienceLessons
@ComputerScienceLessons 4 года назад
You are very kind. Thanks. :) KD
@chinthalaadireddy2165
@chinthalaadireddy2165 Год назад
@@ComputerScienceLessons But really it's awesome video.. the best info in the least possible time.. Thank you so much from India 🥰
@Monochones87
@Monochones87 2 года назад
Lovely, this has been the clearest explanation I've seen so far for Dijkstra's algo. Seriously, thank you so much!
@ComputerScienceLessons
@ComputerScienceLessons 2 года назад
Thanks for saying so. You're most welcome :)KD
@Moggery
@Moggery 2 года назад
Fantastically clear and concise. Makes my revision an absolute dream, I can’t thank you enough. 10/10
@ComputerScienceLessons
@ComputerScienceLessons 2 года назад
Thank you. Delighted to help :)KD
@MimicalThought
@MimicalThought 6 лет назад
We are learning about Dijkstra's Shortest Path in my Data Communications course and this video explains the algorithm much more clearly than my professor had attempted to explain in our lecture video / notes. Thank you very much, in just 10 minutes I was able to understand something I was spending 30-60 minutes on. Well done!! :)
@aquilazyy1125
@aquilazyy1125 3 года назад
This is very enlightening. I’ve come up with a similar algorithm myself that uses a simple width-first or depth-first search, but I’ve never thought of that we should first calculated the vertex with the least known distance! Thanks for sharing it.
@ComputerScienceLessons
@ComputerScienceLessons 3 года назад
Don't thank me, thank this guy :)KD en.wikipedia.org/wiki/Edsger_W._Dijkstra
@ietskaag552
@ietskaag552 4 года назад
Seriously, I've been looking at so many pseudocodes and incomprehensible python scripts without any clear explanation on how the algorithm actually works. I salute you. This has helped me so much. I can't thank you enough.
@ComputerScienceLessons
@ComputerScienceLessons 4 года назад
Yo are most welcome :)KD
@Aca99100
@Aca99100 4 года назад
I have never seen a video with such clear and step-by-step explanations. Good job here!
@ComputerScienceLessons
@ComputerScienceLessons 4 года назад
I appreciate the comment. Thanks. :) KD
@leox8888
@leox8888 2 года назад
Really appreciate this video. As a network engineer, i have read many book about how SPF works but this one is the best. And i can also develop the code based on this video. One thing I was stuck for a while is when having the directed graph (shorted path), it is a bit tricky to print all the shortest path considering ecmp case.
@ayasswain
@ayasswain 6 лет назад
Wonderfully explained. The best video i have come across so far on Djikstra's Algorithm.
@nitesh4146
@nitesh4146 2 года назад
This is the best video on Dijstra's Shortest path algorithm I have viewed on RU-vid. Kudos!
@abooth1707
@abooth1707 4 года назад
Best explanation I've ever seen of this. Thank you so much!
@TourGuideFTW
@TourGuideFTW 7 лет назад
The way you explained the algorithm was just great, thanks a lot for making this video!
@ComputerScienceLessons
@ComputerScienceLessons 7 лет назад
Tnx for the feedback :)
@swethapuskoor7314
@swethapuskoor7314 4 года назад
Computer Science can you explain bellman ford too
@lawrencedennison-hall9642
@lawrencedennison-hall9642 4 года назад
Such a clear and coherent explanation. Watched the Craig n Dave video on this previously but this is such a clearer explanation. Understand this now cheers!
@ComputerScienceLessons
@ComputerScienceLessons 4 года назад
Glad you found it useful. There is nevertheless some good stuff on Craig n Dave's channel :)KD
@babakbekhradmanesh871
@babakbekhradmanesh871 2 года назад
Thanks for your extraordinary explanation. This is literally one of the simplest explanations of an algorithm I have ever watched on RU-vid.
@ComputerScienceLessons
@ComputerScienceLessons 2 года назад
Thank you. You are very welcome:)KD
@ThewOrldIssqUare
@ThewOrldIssqUare 3 года назад
Thanks for this! As others have said, this is one of the clearest explanations on youtube!
@andresnieves9018
@andresnieves9018 6 лет назад
If you can't explain it simply, you don't understand it well enough. Beautifully done. Thank you!
@javadsabbagh8939
@javadsabbagh8939 6 лет назад
Thank you, Kevin. Very understandable and clear.
@sanseverything900
@sanseverything900 2 года назад
Thank you for including the psuedo-code at the end. Really helped me get an idea of how I should structure my own code!
@ComputerScienceLessons
@ComputerScienceLessons 2 года назад
Glad to help :)KD
@GavinLon
@GavinLon 5 лет назад
This is a great video. You have provided a very simple but clear explanation.
@JamshadAhmad
@JamshadAhmad 4 года назад
This video is a definition of precise and concise explanation. Thank you very much.
@supernenechi
@supernenechi 3 года назад
You explained this so incredibly clearly! It's really not that hard at all! Thank you so much!
@dawnjinx4962
@dawnjinx4962 4 года назад
I FINALLY UNDERSTAND THANK YOU SO MUCH!!!! This was the most concise and easy to follow video I've managed to find on this algorithm
@ComputerScienceLessons
@ComputerScienceLessons 4 года назад
You are most welcome. I usually ask my students to check their understanding by working through it with a different graph. :)KD
@ammarulhassan5851
@ammarulhassan5851 3 года назад
After spending lots of time on other videos and stuff finally, I have understood "Dijkstra’s" Thanks to this LEGEND.
@ComputerScienceLessons
@ComputerScienceLessons 3 года назад
You are most welcome :)KD
@ulfinawakjira1977
@ulfinawakjira1977 3 года назад
This is by far the best video I've seen on this subject it made implementation very easy and the explanation is the best I've ever seen so thank you very much!
@hgjghjkhify
@hgjghjkhify 2 года назад
Appreciate this video. Watched a number of others about Dijkstra's Algorithm and couldn't understand HOW and at what stage another path is evaluated. It wasn't until I saw the graph and how we can track the changes that it somehow brought the entire algorithm into crystal clear focus. Thanks!
@ComputerScienceLessons
@ComputerScienceLessons 2 года назад
You are most welcome :)KD
@BrendonWilliams
@BrendonWilliams 7 лет назад
Best explanation I could find. Thanks.
@selvalooks
@selvalooks 5 лет назад
i used to think this "Dijkstra’s Shortest Path Algorithm" is not for me to understand :) , now i can do it even getting from sleep after watching this video , thanks a ton !!!
@danielm7755
@danielm7755 3 года назад
You've just earned yourself a new subscription champ! Great video! I love it!
@ComputerScienceLessons
@ComputerScienceLessons 3 года назад
Thank you and you are most welcome :)
@smith1923
@smith1923 7 месяцев назад
This is by far the best video I've seen on this algorithm. It is clear and doesn't skip any steps.
@ComputerScienceLessons
@ComputerScienceLessons 7 месяцев назад
Thank you :)KD
@RustysAdventures
@RustysAdventures Год назад
This video is a game changer. Understood it in one shot. Brilliant!
@ComputerScienceLessons
@ComputerScienceLessons Год назад
Thank you :)KD
@michellelopez5264
@michellelopez5264 6 лет назад
mannnn, i've been trying to find the missing link with this stuff and your video finally shined some light on the subject!
@amskumar
@amskumar 5 лет назад
Best video on Dijkstra I've seen so far. Thanks for doing it with so much clarity.
@DentrifixoRam88
@DentrifixoRam88 6 лет назад
Hi from Argentina. After watching 4 other videos I can say this is the best explained solution steps I've found so far. Thanks!!
@ComputerScienceLessons
@ComputerScienceLessons 6 лет назад
Tnx
@camilohernandezruiz2776
@camilohernandezruiz2776 6 лет назад
Man, thank you so much. Now you've got a new subscriber. Greeting from Medellín, Colombia.
@ComputerScienceLessons
@ComputerScienceLessons 6 лет назад
Welcome aboard! Thanks for the comment :)
@nehascorpion
@nehascorpion 2 года назад
Very well explained! Best video so far on this algorithm. Thanks a ton.
@alejandrobonilla3201
@alejandrobonilla3201 5 лет назад
You are the best on explaining... Thanks a lot!
@chrise202
@chrise202 4 года назад
You know this is the best illustration and guideline for implementing it on youtube.
@ComputerScienceLessons
@ComputerScienceLessons 4 года назад
Thanks :) KD
@forestpfeiffer1370
@forestpfeiffer1370 3 года назад
Finally, an example that makes sense, wonderful job!
@ComputerScienceLessons
@ComputerScienceLessons 3 года назад
Glad to help :)KD
@whiningmachine
@whiningmachine 2 года назад
Fantastic explanation. Indeed, it's the best, clearest, simplest, and most useful resource by far that I've found after hours of searching. Thanks for making it!
@ComputerScienceLessons
@ComputerScienceLessons 2 года назад
Thank you - and you are most welcome :)KD
@GANDHIXtv
@GANDHIXtv 11 месяцев назад
Best video on Dijkstra's by a considerable margin. Subbed.
@user-lh2cq7yy6b
@user-lh2cq7yy6b Год назад
Man this content mind-blowing clear and simple explained, great work
@ice_cube918
@ice_cube918 2 года назад
This is the best explanation of Dijkstra's algorithm I have seen!! I especially like the last summary part.
@ComputerScienceLessons
@ComputerScienceLessons 2 года назад
Thank you. Glad to help :)KD
@RubainG
@RubainG 7 лет назад
Awesome video ! This made me clear how to simplify and program the Seam algorithm!
@nathanriches9547
@nathanriches9547 2 года назад
Thanks James May. This was a great episode of Top Gear
@ricp
@ricp Год назад
This explanation is by far the Best I've seen.. This is crystal clear , thank you very much!
@ComputerScienceLessons
@ComputerScienceLessons Год назад
You are very welcome, and thank you :)KD
@_elguet5787
@_elguet5787 3 года назад
thank you I was really struggling implementing this algorithm in real coordinates, i realized coordinates are like grid/trees if you zoom it, and i could apply your ideas and explanation to find the shortest path available in a set of xyz 'real' coordinates! awesome.
@KamalMettananda
@KamalMettananda 3 года назад
This explains it perfectly. Thank you so much.
@ddddchannel837
@ddddchannel837 4 года назад
Extremely clear and well thought out video. Thanks for uploading!
@ComputerScienceLessons
@ComputerScienceLessons 4 года назад
You are very welcome. Thanks for the comment. :)KD
@mdotub71
@mdotub71 7 лет назад
Excellent graphical and verbal explanation, very simple and coherent. Thanks for your video.
@anthonyellis9122
@anthonyellis9122 7 лет назад
REALLY well explained. Nice and slow, nice and clear! Many thanks!
@ComputerScienceLessons
@ComputerScienceLessons 7 лет назад
Thanks a million
@stuffboutthegovermet
@stuffboutthegovermet 9 месяцев назад
So easy to follow. Best video I’ve seen on this algorithm
@q1chen
@q1chen 3 года назад
This 10mins video >>> 45mins video from my lecturer. LEGEND🙏
@Jack-hd3ov
@Jack-hd3ov 4 года назад
After watching about 5 videos on this algorithm, yours has made it crystal clear. Thank you.
@ComputerScienceLessons
@ComputerScienceLessons 4 года назад
You're very welcome. :)KD
@Jack-hd3ov
@Jack-hd3ov 4 года назад
@@ComputerScienceLessons Your A* explanation is also the best I found
@sabeen7794
@sabeen7794 7 лет назад
great video ... you really have the spirit of a teacher ... thanks for making this one.
@S3b1Videos
@S3b1Videos 6 лет назад
Most efficient video on dijkstra's algorithm out there :)
@miller5565
@miller5565 3 года назад
I couldn’t have asked for a clearer video, thank you sir.
@ComputerScienceLessons
@ComputerScienceLessons 3 года назад
You're most welcome :)KD
@ahmedsaid8180
@ahmedsaid8180 2 года назад
Thank you very much! I have been trying understand this algorithm for 5 hours and I finally got it now "thanks to you"!
@ComputerScienceLessons
@ComputerScienceLessons 2 года назад
You're most welcome :)KD
@JaffarBrar
@JaffarBrar 4 года назад
Crying in disbelief 😭😭. Finally some clear explanation. Thank youuuuu
@ComputerScienceLessons
@ComputerScienceLessons 4 года назад
You are very welcome. Glad to help. :) KD
@hanbrianlee
@hanbrianlee 5 лет назад
Omg.. out of like 10 dijkstra vids i attempted to eatch this is the best
@binoyskumar
@binoyskumar 6 лет назад
Perfect! keep it coming. Well explained
@Funnybone_FB
@Funnybone_FB 2 года назад
Brilliant. Very well-done and clear explanation. Thank you for this!
@ComputerScienceLessons
@ComputerScienceLessons 2 года назад
Thank you. You are most welcome :)KD
@canmalatyaloglu8690
@canmalatyaloglu8690 4 года назад
The fact that this explanation of Dijkstra's is way more easily understandable and to-the-point than the one Computerphile has is astounding. Slides ftw
@ComputerScienceLessons
@ComputerScienceLessons 4 года назад
You're too kind. Thanks you. :)KD
@canmalatyaloglu8690
@canmalatyaloglu8690 4 года назад
@@ComputerScienceLessons I thank you, recently passed my discrete maths exam :)
@nicolasgorse488
@nicolasgorse488 7 лет назад
Kevin, this is a great and super clear explanation, really !
@ComputerScienceLessons
@ComputerScienceLessons 7 лет назад
Thanks for saying so :)
@theobserver4794
@theobserver4794 4 года назад
two hours of a boring lecture vs 10mins cool explanation. thanks mate
@ComputerScienceLessons
@ComputerScienceLessons 4 года назад
You're very welcome :)KD
@m_t_t_
@m_t_t_ 2 года назад
Thanks for actually including the way to find the shortest path between the start node and a certain node, alot of tutorials leave that out
@ComputerScienceLessons
@ComputerScienceLessons 2 года назад
You're welcome :)KD
@alvaro1728
@alvaro1728 5 лет назад
Thank you for this brilliant explanation!
@chrismorris3056
@chrismorris3056 7 лет назад
Very clear explanation. Well done!
@ComputerScienceLessons
@ComputerScienceLessons 7 лет назад
Tnx Chris
Далее
Dijkstra's Shortest Path Algorithm | Graph Theory
24:47
skibidi toilet 76 (part 1)
03:10
Просмотров 15 млн
Cabeças erguidas, galera! 🙌 Vamos pegá-la!
00:10
How Dijkstra's Algorithm Works
8:31
Просмотров 1,3 млн
Greedy Algorithm - Jump Game - Leetcode 55
0:58
Просмотров 36 тыс.
Dijkstra's Algorithm:  Another example
8:41
Просмотров 787 тыс.
Dijkstra Algorithm
13:44
Просмотров 133 тыс.
Dijkstra's Algorithm - Computerphile
10:43
Просмотров 1,3 млн
skibidi toilet 76 (part 1)
03:10
Просмотров 15 млн