Dijkstra's Algorithm with Code[C++] - Prateek Narang | Coding Blocks

Поділитися
Вставка
  • Опубліковано 22 жов 2017
  • Code - codingblocks.com/ide/#/s/3059
    Check courses on - online.codingblocks.com [Free Trial Available]
    Coding Blocks is pleased to announce courses like C++ and Java, Data Structures and Algorithms, Web and Android Development(Java and Kotlin), Competitive Programming, Coding Interview Preparation and Machine Learning, AI and more.
    #CodingBlocks #ProgrammingMadeEasy #LearnCodingOnline
    Like our FaceBook Page - / codingblocksindia
    Follow us on Instagram - / codingblocks
    Follow us on Twitter - / codingblocksin
    Source code available on -github.com/coding-blocks
    For more interesting tutorials - / @codingblocksindia

КОМЕНТАРІ • 51

  • @shivamkumar-qp1jm
    @shivamkumar-qp1jm 4 роки тому +8

    finally i can implement dijkstra algorithm in c++ using stl now feeling nice

  • @RupeshKumar_121
    @RupeshKumar_121 4 роки тому +5

    great video! I had Learned dijkstra's algorithm but was unable to implement it in c++!
    thanks :), great explaination and loved the code.

  • @INNOVATIVEAPPROACH
    @INNOVATIVEAPPROACH 6 років тому +8

    Bro hardwork seen by way of presenting the code and concept...

  • @milindphalke4369
    @milindphalke4369 3 роки тому +2

    It was a very nice explanation for Dijkstra and loved the way you implemented.

  • @shikharagrawal3424
    @shikharagrawal3424 3 роки тому +1

    Thanks a lot sir..
    It is really helpful.

  • @manjotkaur9070
    @manjotkaur9070 3 роки тому

    Thanku so much Prateek sir...your way of explaining is really simple and easy to understand 🙏🙏🙏

  • @lovekeshmadaan2767
    @lovekeshmadaan2767 5 років тому

    thanks sir you are great your explanation is very good ....

  • @vaibhav6431
    @vaibhav6431 6 років тому

    Thank you for this

  • @vipingautam1400
    @vipingautam1400 3 роки тому +1

    this was not so tricky but implementation was too hard ,you made it clear to me
    thanks

  • @pasitopasito1967
    @pasitopasito1967 4 роки тому

    Thanx to provide some video freeof cost..

  • @Gandhiboy
    @Gandhiboy 3 роки тому

    Best video on the topic on the whole internet 🤩

  • @shubhamjaiswal1325
    @shubhamjaiswal1325 4 роки тому

    Coding blocks you are just awesome

  • @eshuyadav7219
    @eshuyadav7219 6 років тому +12

    Thank you sir for providing these important stuff please implement prim,kruskal

  • @saurabhmishra8356
    @saurabhmishra8356 6 років тому +2

    It's amazing, Thank you so much :)

  • @sanjeevkumar-je5yt
    @sanjeevkumar-je5yt 6 років тому +3

    Thank you so much! my whole college cse student see your you tube channel

  • @akashparihar2063
    @akashparihar2063 3 роки тому

    Awesome bro 🔥🔥🔥🔥🔥

  • @vipingautam1400
    @vipingautam1400 3 роки тому

    thanks for the video bhai

  • @rachitjain3257
    @rachitjain3257 3 роки тому +1

    s.begin() is a pointer and *s.begin() will give u a pair

  • @vaibhavgupta973
    @vaibhavgupta973 3 роки тому

    nice !!

  • @ankushbhardwxj
    @ankushbhardwxj 4 роки тому +6

    Very hard to follow the explanation of the implementation.

  • @vovchicplagov
    @vovchicplagov 3 роки тому

    I also created a map visited and when you check for the path to be shorter I also ask if it is not visited. In this case it won`t be added to our set and dist map and you do not have to look for a pair in the set. Makes it easier to understand the algorithm. The part with the finding and erasing the pair from the set was confusing.

    • @biswajitsahoo1456
      @biswajitsahoo1456 3 роки тому

      bro the last portion of erasing and finding is a little bit confusing can u send me your code that might help me out.

    • @vovchicplagov
      @vovchicplagov 3 роки тому

      ​@@biswajitsahoo1456 ​ check out your channel discussion

  • @miguelprincipegoods1906
    @miguelprincipegoods1906 6 років тому

    I need this same code, but in Visual Basic Excel. I intend to formalize a DATAMATRIX of distance between streets or houses in a city. Very urgently .. It is Dijkstra Algorithm.

  • @rachitjain3257
    @rachitjain3257 3 роки тому +1

    13:00- algorithm

  • @mishraabhyuday
    @mishraabhyuday 3 роки тому

    Shouldn't there be a visited array if I want to have a parent array, as then the neighbour which is a parent would be visited again and parent array would be updated wrongly??

  • @Raghav_362
    @Raghav_362 3 роки тому

    but when set was sorted ?plz tell

  • @thiyagus6829
    @thiyagus6829 6 років тому

    can you please explain a path also in a form of code bro

  • @codinggems9973
    @codinggems9973 3 роки тому

    this algo is not working for directed disconnected graph

  • @poonamkhopade9028
    @poonamkhopade9028 Рік тому +1

    Code is not opened

  • @navneetshukla5582
    @navneetshukla5582 2 роки тому +1

    This code is not giving correct output

  • @IndieDeveloperGuy
    @IndieDeveloperGuy 3 роки тому

    please tell more clearly, how will i know the exact path?

  • @securityintech
    @securityintech 4 роки тому +1

    set cannot have duplicate values, right? so we can use multiset here, i think so

    • @shubho5das
      @shubho5das 3 роки тому +1

      Every node has a Unique Value.
      You cannot have 2 "Amritsar"s on a Map, right? 😄

  • @sakshigupta2315
    @sakshigupta2315 4 роки тому

    what is the complexity of this algo

  • @user-yj5iw8hi5x
    @user-yj5iw8hi5x 5 років тому

    oohh guys i need source code! can u send me on comments or "Admin: pls give me code on description " ty for ur attention

  • @marvel438
    @marvel438 5 років тому +2

    The explanation was not that great but implementation was amazing.

  • @abkyabacha
    @abkyabacha 4 роки тому

    A small mistake at 0:48, when you say it's the algorithm for a graph with no negative weight cycle. It should be algo for a graph with non-negative edge

    • @tusharahooja691
      @tusharahooja691 4 роки тому +1

      The negative edges are considered. If from our current node we can reach an already visited node via negative edge, we again visit our already visited node. But for negative edge cycle it fails as for each cycle iteration we can a smaller path

  • @mishraabhyuday
    @mishraabhyuday 3 роки тому

    Nice explanation otherwise

  • @infinix_11
    @infinix_11 4 роки тому

    There is no coherence between explanation and code.

  • @souvikdas2759
    @souvikdas2759 4 роки тому

    Not like other videos...very poorly explained. This needs to be updated