How Dijkstra's Algorithm Works

Поделиться
HTML-код
  • Опубликовано: 22 дек 2024

Комментарии • 784

  • @hongweichen3581
    @hongweichen3581 3 года назад +904

    Came from Computerphile's video after not understanding, and this is just so much better! You made advanced concepts so easy to understand for beginners like me, thank you.

    • @TainuiaKid1973
      @TainuiaKid1973 2 года назад +9

      Here's the implementation in Python
      ruclips.net/video/VnTlW572Sc4/видео.html

    • @Itachi.Uchiha.Offical
      @Itachi.Uchiha.Offical 2 года назад +19

      Same! Came from Computerphile, felt dumb, watched this, and understood.

    • @turuus5215
      @turuus5215 2 года назад +10

      Same, concepts should be intuitive for humans.

    • @dineshkumare1750
      @dineshkumare1750 2 года назад +5

      @@TainuiaKid1973 I also came here after seeing Computerphile video😂..

    • @nayankumarbarwa4317
      @nayankumarbarwa4317 2 года назад +1

      This video is criminally underrated

  • @supersakib62
    @supersakib62 Год назад +72

    One thing I realized, visualization is more helpful to grasp a context than just reading about it.

    • @tegathemenace
      @tegathemenace 5 месяцев назад

      Realizing this a night before exam😂

  • @beketmyrzanov1979
    @beketmyrzanov1979 3 года назад +1332

    This video is ridiculously underrated ((

  • @Mobin92
    @Mobin92 2 года назад +72

    THANK YOU for the part at 6:28 ! Nobody else seems to explain how to actually find the path, and not just it's length.

    • @TaMarAaQ
      @TaMarAaQ 2 месяца назад

      Exactly! I've been trying to figure that out for an hour, now I get it!

  • @Yell-Heah
    @Yell-Heah 2 года назад +83

    I've been agonizing over trying to understand this algorithm for a class for hours- and now I'm about halfway through this video, and I'm already feeling enlightened. It's FINALLY clicking. You're a lifesaver, mate!

  • @aries3690
    @aries3690 2 года назад +635

    I cant stress how amazing these animations are! You are a livesaver for "self-learners" like us :)

    • @acedev003
      @acedev003 2 года назад +2

      Absolutely!

    • @Yell-Heah
      @Yell-Heah 2 года назад

      fuck, dude, yeah. I don't learn anything from my college lectures- I need stuff I can pause and rewind, and my monkey brain does great with visual assistance. needing to basically self-teach myself all my CompSci, I don't wanna think about where I'd be without videos like this

    • @MichaelKingsfordGray
      @MichaelKingsfordGray Год назад +1

      Learn your real name first!

    • @MikhailFederov
      @MikhailFederov Год назад +4

      Calling yourself a self learner is meaningless. Everyone is a self learner.

    • @MichaelKingsfordGray
      @MichaelKingsfordGray Год назад +1

      @@MikhailFederov There is a more respectable term for self-taught:
      Autodidact.

  • @dominiorrr6510
    @dominiorrr6510 Год назад +39

    I love learning based on examples and this is by far the best example of Dijkstra's algorithm I've seen so far. It covers a lot of aspects that might not be obvious at first. I haven't even learned Dijkstra yet, but it feels trivial to implement after knowing how simple graph algorithms like DFS or BFS work.

  • @penguinjuice311
    @penguinjuice311 Год назад +3

    Absoloute life saver. Got taught this by a teacher who literally doesn't know computer science so videos like this are vital.

  • @skidoodles
    @skidoodles 4 года назад +277

    For each vertex v:
    Dist[v] = infinite
    Prev[v] = none
    Dist source = 0
    Set all vertices to unexplored
    While destination not explored:
    V = least valued unexplored vortex
    Set v to explored
    For each edge (v, w):
    If dist[v] + len(v, w) < dist[w]:
    Dist[w] = dist[v] + len[v, w]
    Prev[w] = v

    • @annadar008
      @annadar008 4 года назад +3

      Thank you to SpanningTree for the insight and thank you for the memo !

    • @abam9787
      @abam9787 Год назад +1

      What's the significance of Prev[w] when the latest update of Dist[w] is more important?

    • @AlumniQuad
      @AlumniQuad Год назад +3

      @@abam9787 6:24

    • @irrelevant_noob
      @irrelevant_noob Год назад +3

      @Skidoodles the last two lines should be indented more, to indicate they are both part of the "if true" branch of the conditional. Also, why not indent for the while loop?

    • @ayeyebrazof6559
      @ayeyebrazof6559 Год назад +6

      For each vertex v:
      Dist[v] = infinite
      Prev[v] = none
      Dist[source] = 0
      Set all vertices to unexplored
      While destination not explored:
      v = least valued unexplored vertex
      Set v to explored
      For each edge (v, w):
      If dist[v] + len(v, w) < dist[w]:
      Dist[w] = dist[v] + len[v, w]
      Prev[w] = v

  • @alliepiper4772
    @alliepiper4772 9 месяцев назад +2

    I've been watching a few of your videos over the last day or so, and they're all just so good. You really have a knack for explaining complicated concepts with a clear, easy-to-grasp visual style. I think I'd describe your channel as "3blue1brown for computer science" :) I hope that comes off as complementary as it's intended. Kudos, and keep up the great work, I'm looking forward to more!

  • @egalomon
    @egalomon Год назад +2

    I don't know why YT is recommending this to me 2 years after its upload, but I gladly clicked on the video! This is pretty much the only thing I remember from when I was studying Geoinformatics before I quit lol so it's a nice throwback for me. Very well explained too! 8:30 for something our professor needed like 2 weeks for

  • @ujjwalgupta4160
    @ujjwalgupta4160 3 года назад +28

    Kudos to the animation and explation.

  • @MartinStaykov
    @MartinStaykov Год назад +4

    I don't think I've ever watched anything ever explained in a clearer way than this.

  • @jls-t3g
    @jls-t3g Год назад +2

    It's amazing that I recognized this voice immediately and realized this random video I picked is actually from Brain! Thank you for all the hard work you've done!

  • @CrescentDolluwu
    @CrescentDolluwu Год назад +1

    Besides how great of a job this video explains this concept, The absolute best part is the little blue robot blinking and looking around.

  • @prashanthvaidya
    @prashanthvaidya 3 года назад +131

    The animation is just outstanding!
    A video on "how" you make these videos or just what inspired you to get started on this creative journey would be awesome.
    Keep up the amazing work. I have subscribed and also pressed the bell icon. :)

  • @curiosityinrush
    @curiosityinrush Год назад +1

    So far the best and easiest explainations i have ever seen on YT yet for dijkstra;s Algo. Great work !!! Thank you :)

  • @ccsmooth55
    @ccsmooth55 Год назад +2

    Very helpful video. Im a Network Engineer and this is how OSPF works (because it uses Djikstras Alg.). Instead of towns, its nodes (routers) on a network.

  • @qazizayad
    @qazizayad Год назад

    i have my Alevel Comp Sci paper 12 hours from now. I love you man. Youre a real life saver

  • @_pro_grammer_
    @_pro_grammer_ 3 месяца назад +1

    Liked this video 2 years ago even without understanding what is explained. now after learning all those algorithms, revisited this masterpiece

  • @Adarsh_Tiwari
    @Adarsh_Tiwari Год назад +4

    This is almost similar to the CPM (Critical Path Method) that we study in Project Planning and Management. So beautifully explained

    • @TheMofRider2
      @TheMofRider2 Год назад +1

      Just wanted to mention that. You're absolutely right 🙂

  • @pend_deletepatrickguarente4916
    @pend_deletepatrickguarente4916 Год назад +2

    By far the best video on this subject I have ever seen, FANTASTIC job with those animations they are really good!

  • @ajaysrinivas2814
    @ajaysrinivas2814 Год назад +4

    What a great explainer video! Please make more of algorithms. Thanks a lot for making this video.

  • @taumahL
    @taumahL Год назад

    Incroyable ! Mes profs n'ont pas réussi à ma faire comprendre cet algo en 1h et là je tombe sur cette vidéo ! Merci tu viens de sauver mon année !

  • @HabunoGD1821
    @HabunoGD1821 Год назад

    I loved the video and your explanation.
    I read something out there and I want to share it
    3:47 - 4:42 "It's important to note that this approach may have limitations and doesn't always ensure the most accurate result. In certain situations, it could lead to inaccurate estimates if the initial estimation doesn't precisely reflect the reality of the path. In the original Dijkstra's algorithm, continually updating estimations is crucial to ensure the accuracy of the shortest path."

  • @VG-re1bj
    @VG-re1bj Год назад

    I see everyday at my work that when one is able to easily understand a concept or idea, either the subject is assumed to be easy or the person learning it assumed that all the merit is hers/his.
    … But if it takes a big effort to understand an explanation, then for sure it is always the fault of the one providing it.
    The fact that you can perfectly understand something does not mean you can easily explain it to others: *Explaining things is not trivial* and if you watch a video and get the idea straight away, please, do not automatically assume you are extremely clever but consider the effort made by the person providing the explanation.
    Thanks for this excellent video.

  • @naughtiusmaximus
    @naughtiusmaximus Год назад +17

    To understand Djikstra, you need to understand Roche and Ves's Theorems. And then Geralt's theorems.

    • @quadroninja2708
      @quadroninja2708 Год назад +2

      I can't find anything about Ves's and Geralt's theorems. Could you please share some links to these?

    • @quadroninja2708
      @quadroninja2708 Год назад +1

      oh i see, it's a joke :-)

    • @naughtiusmaximus
      @naughtiusmaximus Год назад +2

      Its a Witcher joke :D

    • @repkins
      @repkins 6 месяцев назад

      Every time I encounter Dijkstra name, I think about Novigrad.

    • @fallegapyro
      @fallegapyro 4 месяца назад

      😂😂😂

  • @keitumetsemolefe3515
    @keitumetsemolefe3515 Год назад +2

    This is the best explanation on Dijkstra's algorithm I've ever come across!! 🙌🙌

  • @ghanshyamtripathi221
    @ghanshyamtripathi221 11 месяцев назад

    not even kidding this is the best explanation/ visualisation one can ever get Thank you sir!!

  • @minhlaburninghihi5627
    @minhlaburninghihi5627 4 года назад +19

    Coolest video on Dijkstra's ever. So easy to understand, thank you so much.

  • @davewilson4493
    @davewilson4493 Год назад +8

    No doubt like many other people, I reinvented a variant of this particular wheel (in my case back in the mid 90s while writing "AI" code for NPCs at a games company).
    A guy on our team who actually liked writing in x86 assembly language had written a brute-force A-B routefinding function that was slow enough to take up meaningful time.
    After some playing around in C, I ended up zeroing in on the offspring of Dijkstra which fully explores the graph and finds the shortest routes to everywhere, and it was several orders of magnitude faster than the assembly guy's code.

    • @MattTrevett
      @MattTrevett Месяц назад

      Why was it faster?

    • @davewilson4493
      @davewilson4493 Месяц назад +1

      @@MattTrevett I'm not *entirely* sure what my mate was doing since I couldn't get (or (more likely) couldn't be bothered getting) my head round his code. I've written in various assembly language before and since, but I never really got along with x86, and someone else's assembly code can be hard to read at the best of times, but I think his code was focused on getting from A to B and comparing path lengths, whereas my code just spread out from A and continually updated the shortest paths from A to everywhere yet found as it went, which meant it could simply rule out and not waste time exploring any possible path that was clearly worse than something it already knew about, and that avoided a huge amount of pointless probing.
      I'm not even sure what kind of termination condition he had - for my code it was easy - it just stopped when it found the shortest route to everywhere.
      To be honest, once I had played for a morning and got better results than he had, and then tweaked things further in the afternoon, even with my distinctly limited social skills it seemed best not ask too many questions, especially as I liked him.
      It's so long ago, I can't even remember how he ended up writing his code in the first place given that he didn't need it and I did. Possibly it was the result of one of the dreaded meetings with our project manager where I tried to tune out and think about other things as much as possible in order to minimize my entirely justifiable urges to strangle him (the project manager, not my fellow coder).

  • @javel476
    @javel476 2 года назад +1

    Best video about dijkstra algorithm I have ever seen

  • @PrafulPrasad
    @PrafulPrasad 3 месяца назад

    This is the best explanation I have found for Djikstra along with code.

  • @ozboomer_au
    @ozboomer_au Год назад +2

    A very helpful video. Just looking at code and some rambling explanation in a book made the algorithm as clear as mud in a beer bottle to me... but this video has made it so abundantly clear... and seeing how code is derived from it is more than helpful. Thanks so much for posting.

  • @artyCrafty4564
    @artyCrafty4564 Год назад

    Not only the video is underrated but the whole youtube channel is underrated. best of luck you spanning tree. This is the future of education. I feels so good when i look up to such unique educational channels.

  • @a.nataliia
    @a.nataliia 6 месяцев назад

    After CS50 that's one of my favourite voice on RUclips ☺ Thank you Brian for your great work!

  • @___vandanagupta___
    @___vandanagupta___ Год назад

    The amazing quality of your videos is super underrated

  • @bapynshngain
    @bapynshngain Год назад +14

    This was really very insightful. I wish more teachers would adopt this method of teaching because it is so much easier to understand than the traditional textbook method!

    • @ghad6799
      @ghad6799 11 месяцев назад

      While giving high quality lectures on white board is skill. Honestly, our education system is fine, just the skill issue of conveying an idea. Fucking hell my "international university" profs can't even speak English.

  • @DontAddMe
    @DontAddMe Год назад

    beautifuly explained! Dont stop making these videos. You are the savior of cs students

  • @ikuubi
    @ikuubi Год назад

    Most grandiose of respect,
    the other day I saw a video that jump straight to explaining the 'cost'. Me being a non technic person can't understand why a to b took so long, while you can just hypothenuse your way to b.
    But now it makes sense!

  • @tongluo9860
    @tongluo9860 3 года назад +1

    I am taking CS50 Edx class, I recognized this voice. It must be you Brain. Wonderful job explaining this concept, just like you did in CS50!

  • @KingstonFortune
    @KingstonFortune 2 года назад +2

    This is so much better than some other ones I already saw....and that was a nice tip at the end, referring to the negative value.

  • @SaidElnaffar
    @SaidElnaffar Год назад +1

    I am sharing this link with my students in the Data Structures course -- Keep it up!

  • @saipan1970
    @saipan1970 Год назад

    The ambience,sound the illustration and putting the main logic behind this algorithm : Clarity and transparency are optimum.Please do make videos like this for every important algo,a request.Refreshing..

  • @adrienw4704
    @adrienw4704 Год назад +1

    very interesting!
    i love how you voice over your code. you make it super understandable!

  • @shufflecat3334
    @shufflecat3334 Год назад +29

    Very well explained! The only feedback I can provide is that I personally found the background music annoying. The wind instrument (flute?) seemed a bit obnoxious and interrupted my focus on the concepts being presented pretty often.
    Kind of hard to know that sort of thing ahead of time, but that's just my personal experience of the video. :)

    • @fosatech
      @fosatech Год назад

      The music makes me want to kms

    • @hairold5680
      @hairold5680 Год назад

      Agreed, itd be better without it

  • @curesnow6493
    @curesnow6493 2 года назад

    I am a virtual person and this is my first video so far, and it is very easy to understand!

  • @johnle7705
    @johnle7705 3 года назад +1

    This channel is a germ!! So glad I found you!

  • @maxdemian6312
    @maxdemian6312 2 года назад

    The best video on RUclips on this subject

  • @sherazdotnet
    @sherazdotnet Год назад +6

    Very nicely explained and graphics effect are perfect as well. If you pay attention to what the author is speaking, you'll notice that he used proper terms like "go to the town we haven't visited". In other words, only visited if its not visited. In other words, keep track of visited nodes. Very nice explained.

  • @soyandoat4106
    @soyandoat4106 3 года назад +2

    Please continue to do more of this video! Thank you so much for your content!!

  • @ChazWinter
    @ChazWinter Год назад

    We are covering this in class right now, and my class loves this video.

  • @nawalkhawar7602
    @nawalkhawar7602 7 месяцев назад +1

    you're videos are extremely helpful. thank you for making these! Also love the robot

  • @null-wraith
    @null-wraith Год назад +5

    By far THE best graphical explanation of Dijkstra's algorithm and it covers improving it to get the actual path 👍

  • @namankeshari7332
    @namankeshari7332 Год назад

    This is the first video I watched on your channel and on dijkstra's algorithm and damnn it was sooo good! Loved it!

  • @demonking2526
    @demonking2526 2 года назад +4

    Very great explanation, I just followed along Dikstra's algorithm in pseudo code and implemented pathfinding in Unity using it. This visual tool really helps explain the algorithm at hand! Great work.

  • @chrisogonas
    @chrisogonas Год назад

    Excellent illustration of the Dijkstra's algorithm. Superb!

  • @BrianOSheaPlus
    @BrianOSheaPlus Год назад

    Excellent video. Clear and concise description of Dijkstra's algorithm.

  • @jessojohn9226
    @jessojohn9226 Год назад

    i never subscribed a channel just watching one video before..You are so good

  • @grv7437
    @grv7437 Год назад +4

    From Google Maps to Project Management (CPM) the applications of this algo are literally limitless

  • @rodrigo-tj1gf
    @rodrigo-tj1gf Год назад

    You need to post more, those videos are freaking good

  • @ssamship2275
    @ssamship2275 Год назад +1

    This video had actually insane timing. Just went over this in class.

  • @Mercury2wo
    @Mercury2wo Год назад

    Fantastic video!! Am watching all your videos back to back

  • @for_whom_the_bell_tolls
    @for_whom_the_bell_tolls 4 месяца назад

    Wow, Brian is brilliant, such a quality explanation!

  • @anilsuyal
    @anilsuyal 7 месяцев назад

    What an amazing explanation, that too with a visualisation. Thank you so much. Please keep posting such Visualisations of algorithms.

  • @platypi_otbs
    @platypi_otbs Год назад

    I saw this in a class in 1994 or 5. This has always been my favorite algorithm I've ever learned. Nice video

  • @smikkelbeer7890
    @smikkelbeer7890 Год назад

    By far the best explanation on the internet. Thank you

  • @aravindaakash8602
    @aravindaakash8602 Год назад

    The update of estimates does not solve if the expression of the problem varies. Town A to Town B would be through A - C - E - B . By this way the elimination of the tries can be doubled if we search in a axle algorithm using all the possibilities

  • @megamaser
    @megamaser Год назад

    The first time I figured out this algorithm, it was by reading code. That worked, but took way longer than watching this video. This video is very nice. It is clear and touched the most important points. You've made an intuitive understanding of Dijkstra's algorithm easily accessible to anyone. The only thing I would add to this video is at least a brief mention that you would put the data in a heap. This could be a nice segue into a separate video about heaps.

  • @allblueandyou
    @allblueandyou 3 месяца назад

    FINALLY understood Dijkstra!! thank you so so much!

  • @ghostfjdgcsusvsgsj
    @ghostfjdgcsusvsgsj 2 года назад

    best explanation of dijkstra's algo so far

  • @ZenoDovahkiin
    @ZenoDovahkiin 7 месяцев назад +11

    Ok but can we appreciate the happy music and the cute robot?

    • @JRunnerE
      @JRunnerE Месяц назад

      I know right.

  • @dailyamazingshortvideos
    @dailyamazingshortvideos Год назад

    This is the best explanation,one can ask for. . Waiting for more such algo explanations

  • @mdkhaledhossain996
    @mdkhaledhossain996 Год назад

    this is just mindblowing, keep creating content like this, you will reach to million subscriber within no time

  • @stith_pragya
    @stith_pragya Год назад +1

    Thank You So Much for this wonderful video...........🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻

  • @finditout6191
    @finditout6191 3 месяца назад +1

    As soon as i heard the voice i knew it was Brian Yu.

  • @opinions8731
    @opinions8731 Год назад

    Damn, I recognised Brians' voice from CS50AI. Respect for your joy of teaching man!!

  • @bscorvin
    @bscorvin Год назад

    My professors love bringing up the traveling salesman problem and then not elaborating, so this was fun. Thanks!

  • @ayushman_sr
    @ayushman_sr 3 месяца назад

    Bestest Dijkstra's algo explanation

  • @sankalpspatil4890
    @sankalpspatil4890 2 года назад

    After watching a few videos on this, for some reason the robot and town animation made the concept finally click. Thanks!

  • @nojoodothmanal-ghamdi1026
    @nojoodothmanal-ghamdi1026 3 года назад

    How this video have less than 30k views!! It deserves ar least 1M, I really understood it so well thank you so much

  • @MoscleBrog
    @MoscleBrog 11 месяцев назад

    i am always blessed when i am doing studies and i am looking up problems and you show up and i insta click you videos because u clarified the most annoying theory namely pigeon theory with ease thanks for the effort spanning tree for your hard work😘

  • @firebraingames
    @firebraingames 3 года назад +1

    Great way to get a feel of Dijkstra's Algorithm

  • @magik0630
    @magik0630 3 года назад

    Excellent walkthrough. 4th video down and I finally get it. Thanks

  • @nielsdaemen
    @nielsdaemen 11 месяцев назад

    Best explanation of Dijkstra's Algorithm!

  • @SimonTheDankOne
    @SimonTheDankOne 2 года назад

    I have a shortest path problem that I am currently working on, and even though I am familiar with the Dijkstra algorithm this somehow just made me instantly realise of my mistake in code. Gracias

  • @elijahdecalmer613
    @elijahdecalmer613 Год назад +1

    Very great visualisation, thank you

  • @ThusiM
    @ThusiM Год назад +1

    Hey this is great. Very clear, straightforward, practical and comprehensive. Please make an animation explaining eulerisation/ hamiltonian and planar graphs if you get a chance. Showing love from South Africa.

    • @brendawilliams8062
      @brendawilliams8062 Год назад

      Am I misunderstanding G. Perlman? This concept is used in many ways.

  • @jibachhyadav7241
    @jibachhyadav7241 4 года назад +17

    Thank you. please cover some topic in Dynamic Programming too!

    • @SpanningTree
      @SpanningTree  4 года назад +5

      See ruclips.net/video/oifN-YVlrq8/видео.html for an introduction to dynamic programming!

  • @koomky
    @koomky Год назад

    I used the Dantzig method to do this. Now I understand a new method, thanks

  • @davngo
    @davngo 3 года назад +1

    Awesome explanation, short and to the point.

  • @이성철-v5v
    @이성철-v5v Год назад +1

    This channel is so good.

  • @HuzaifaKhan-iy5qj
    @HuzaifaKhan-iy5qj 6 месяцев назад

    I didn't even completed minute of the video yet, i've subscribed the channel.

  • @RaviRajShow
    @RaviRajShow Год назад

    One of the Best channel but underrated 🤗

  • @rocket007
    @rocket007 Год назад

    Really cool stuff. I am also happy about the snippet code algorithm at the end

  • @xeanluxcrille6847
    @xeanluxcrille6847 2 года назад +40

    Hello, just want to ask. What if there is no path between vertices F and C, how do we visit vertex C? Or is there some prerequisite to the graphs configurations for Djikstra's algorithm to work?
    Edit: Okay, I got the answer as I searched for the explanation about Djikstra's algo.
    So apparently, when you choose the next vertex to explore, you need to choose the one with the least distance recorded from all the vertices not yet explored. Note that it should be the set of ALL unexplored vertices, not only the vertices adjacent to the current vertex you have explored. (When a vertex has been visited AND the distances of all its adjacent vertices are calculated, only AFTER these two conditions are fulfilled will a vertex be considered "explored".)
    Therefore, in a case where vertices F and C are NOT connected, then vertex C will still be the next vertex to explore after vertex F because even though in this case vertex C is NOT connected to vertex F, among ALL the unexplored vertices (regardless of whether it is adjacent to vertex F or not), vertex C has the least cumulative distance from vertex A.
    Vertex C has a current distance of 3 from vertex A, compared to the current cumulative distances of vertices E (dist: 5), B (dist: 8) and G (dist: 7) calculated from vertex A (via vertex F).
    I'm not so sure if the video already mentioned this, but I hope this helps anyway.

    • @Also_sprach_Zarathustra.
      @Also_sprach_Zarathustra. Год назад +1

      Thanks !

    • @benzouz2872
      @benzouz2872 Год назад

      Thank you I was also wondering that

    • @frfancha
      @frfancha Год назад +3

      Yes, it actually extremely useful. And without that the affirmation "we have found the shortest path of 5:30" doesn't make sense.
      In a way the illustrated example is badly chosen as it makes you _think_ you always explore further some connected vertex.

    • @mattbukovski92
      @mattbukovski92 Год назад

      Thanks, I was wondering the exact same thing

    • @yapayzeka3183
      @yapayzeka3183 Год назад

      Thanks. I was also wondering if there was no path between F to B and the path between E to B is greater than the path along C-D-B, it wouldn't be right. Now it makes much more sense.

  • @bulioh
    @bulioh 9 месяцев назад

    I've been trying to internalize the intuition of once we explore a vertex, it's _guaranteed_ that we found the shortest path to it. I know it's from always having prioritized exploring the shortest path we've considered so far, like he mentions in 5:30, but my mind keeps thinking, "Wait, what about all the other paths to it we _haven't_ considered? Could one of those end up being a shorter path?". I guess that could only be the case if there were negative paths, connecting to what he said at 7:03?

  • @gutzimmumdo4910
    @gutzimmumdo4910 Год назад +6

    perfectly explained, intuitive well ordered and perfect example.
    great work

  • @rockstarpesu
    @rockstarpesu Год назад

    Such a great way to explain the complex topic. Thanks a lot. 😊

  • @sulaymonolimov7798
    @sulaymonolimov7798 Год назад +1

    how amazing explanation, so much underrated. Anyway, I am happy to subscribe to such a channel!