3.6 Dijkstra Algorithm - Single Source Shortest Path - Greedy Method

Sdílet
Vložit
  • čas přidán 14. 06. 2024
  • Dijkstra Algorithm for Single Source Shortest Path
    Procedure
    Examples
    Time Complexity
    Drawbacks
    PATREON : www.patreon.com/bePatron?u=20...
    Courses on Udemy
    ================
    Java Programming
    www.udemy.com/course/java-se-...
    Data Structures using C and C++
    www.udemy.com/course/datastru...
    C++ Programming
    www.udemy.com/course/cpp-deep...

Komentáře • 1,7K

  • @michaelwoodruff5752
    @michaelwoodruff5752 Před 5 lety +2446

    paying so much money for a piece of paper when I end up just learning everything online. Well done sir, you are great at presenting new information to people. Definitely better than my professor, whose job is to present new information to people.

    • @AlterRektMLG
      @AlterRektMLG Před 5 lety +89

      college is scam

    • @vanbaz4440
      @vanbaz4440 Před 5 lety +62

      college IS Fraud

    • @albertulysse8054
      @albertulysse8054 Před 5 lety +59

      This gentleman is so exceptional in explaining these complicated algorithms.

    • @taesh375
      @taesh375 Před 5 lety +8

      well i can't denied what u said somehow all students ended up learning online

    • @junaidfarooqui1993
      @junaidfarooqui1993 Před 5 lety +26

      College is OutDatEd.ucation

  • @user-lp4qs9bn6g
    @user-lp4qs9bn6g Před 5 lety +2106

    Following this great man from Morocco.. i do believe that india has legends and great teachers .. Respects Sir

  • @elva136
    @elva136 Před 2 lety +589

    I had the pleasure of learning from Abdul Bari sir on DSA in a classroom for GATE coaching. I remember he politely asked everyone to subscribe to his CZcams channel back then and I came home and first thing I did was subscribe to his channel when he had 400 subscribers. Super proud to see him verified on YT! this is what perseverance and hard work is really about! all the best sir!

  • @mayurbhor2231
    @mayurbhor2231 Před 3 lety +699

    Watching this video from Mars ,
    Believe me No one teaches DSA better than him here ..
    Thanks for helping me find shortest path to moon..

  • @tanzimahad9159
    @tanzimahad9159 Před 3 lety +316

    This is what I call a contribution to society. Thank you, sir, your
    lectures have helped me lot in understanding DSA.

  • @sharif47
    @sharif47 Před 5 lety +5358

    Your videos are having a bad influence on the students. They are skipping their classes because your methods are way better.

  • @definitesquare
    @definitesquare Před rokem +106

    Sir my lecturer (He is the hod of our department) is seeing your videos and teaching us in the class 😂.. that shows how good a teacher you are!

  • @akashh5238
    @akashh5238 Před 4 lety +1310

    One thing I noticed
    Has he ever asked for like and subscribe
    Amazing

    • @HARIHaran-ks7wp
      @HARIHaran-ks7wp Před 4 lety +57

      If the work is excellent, no need to ask. Everyone would come onboard without question.

    • @cjgokuhomes10
      @cjgokuhomes10 Před 4 lety +15

      These videos are from, his udemy course.

    • @cjgokuhomes10
      @cjgokuhomes10 Před 4 lety +7

      @@abdul_bariOh thanks sir

    • @keysersoze7919
      @keysersoze7919 Před 4 lety +34

      Some people just want to watch the world learn!

    • @anshumanxda
      @anshumanxda Před 3 lety +1

      @@cjgokuhomes10 nope, he made this for youtube

  • @thr3eto1
    @thr3eto1 Před 5 lety +93

    Let me be the first to say I find lighting in this video impressive. Nothing is too dark or too exposed and no shadows. Thank you, sir.

  • @Full-dh5gc
    @Full-dh5gc Před 3 lety +80

    Thank you so much Sir, Tomorrow I have my exam and I am feeling relaxed after watching your videos. Thanks again May God bless you and your family.

  • @omkarkulkarni3644
    @omkarkulkarni3644 Před 4 lety +177

    Bought his C++ course ! It's one of the most detailed course I have been through... Abdul sir is a legend :) Hopefully get 1M soon... Respect .

    • @komekko373
      @komekko373 Před 4 lety +1

      Tell me your udemy account
      Pm me on telegram
      @Akumetsu_Madness

    • @palmistryyog
      @palmistryyog Před 3 lety +4

      He got 1 M..✌️✌️✌️

    • @elgary9074
      @elgary9074 Před 3 lety +3

      How is his C course, I think is the same isn't it? C and C++ course from Udemy ... I'm planning to buy it!!! can you tell me about it?

    • @OneLordeAnimeClips
      @OneLordeAnimeClips Před 6 měsíci

      @@elgary9074 Did you end up getting it and how was it if you did?

  • @aashiagrawal1910
    @aashiagrawal1910 Před rokem +21

    I don't know why I am paying more than 100 grands for a sheet of paper when I can really study and understand everything from this channel. By far the best teacher and channel for CS students out there. Kudos.

  • @himanshurana2242
    @himanshurana2242 Před 5 lety +358

    aapki wajah se humne class me padhna chhod rkha hai . Coz we know Abdul Bari ji hain naa ...So Chilll

    • @dipti3463
      @dipti3463 Před 5 lety +3

      Definitely man your words are so true so real no one can deny that.

    • @ravipabari2290
      @ravipabari2290 Před 4 lety +3

      @K163941 Sheheryar Pirzada lol u are talking about some...mene to pura sem nai attend kiya hai :)

    • @UpasanaDeka
      @UpasanaDeka Před 4 lety +1

      😂😂

    • @rifatislam5836
      @rifatislam5836 Před 4 lety

      @@abdul_bari sir is this the travelling salesman problem using greedy method?

  • @chavansagar2293
    @chavansagar2293 Před 5 lety +95

    I started loving data structure and algorithm once I started watching your CZcams video's....may God bless you..we need more teachers like you sir..

  • @MistaT44
    @MistaT44 Před 4 lety +89

    I remember watching these videos during my algorithms module exam. Now I am workig as a software engineer. Thanks sir, respect!

    • @goodwood7286
      @goodwood7286 Před 2 lety +1

      Hii..
      I want my son to be software engineer..from where I should start..plz guide me

    • @WHACDBHAVANA
      @WHACDBHAVANA Před 11 měsíci +11

      @@goodwood7286 ask your son if he is really interested in it?

  • @TJKhara
    @TJKhara Před 4 lety +510

    This is just for my reference sorry i don't know a better way:
    4:36 start of the example
    5:13 repeating steps start
    5:28 performing relaxation
    6:11 next vertex (3) selected
    6:51 vertex 4 selected
    7:18 making chart of shortest distances
    7:48 time complexity of the algorithm
    9:26 text book example begins
    13:34 drawback of the algorithm

  • @ankitmandloi772
    @ankitmandloi772 Před 5 lety +133

    Kabhi kabhi lagta hai ......Aap hi bhagwan hai (Specially Exam time me)
    Sound Knowledge with Clear explanation You have got it within you sir Take it forward

  • @harshshah7250
    @harshshah7250 Před 5 lety +15

    The most soothing voice of a teacher I've ever heard!

  • @ThatDudeUKChronicles
    @ThatDudeUKChronicles Před rokem +7

    I appreciate your calm and relaxed tone when delivering information in a concise manner. Your approach doesn't seem hurried and is extremely soothing, which I believe even students with tight assignment deadlines would find calming as they read through.

  • @user-realfredricko
    @user-realfredricko Před 2 lety +12

    I love your teaching,sir. Keep it up. Likes from Kenya

  • @naraendrareddy273
    @naraendrareddy273 Před 6 lety +176

    You are much better than my teachers sir , you explain really well !! Thanks.

  • @AkhileshYadav-oi4ti
    @AkhileshYadav-oi4ti Před 5 lety +160

    I spent 18 good minutes of life here..Thanks sir

    • @aplutaplut176
      @aplutaplut176 Před 3 lety +6

      I spent more than 18 minutes

    • @mohammedfalih8713
      @mohammedfalih8713 Před 3 lety +2

      @@aplutaplut176 it depends on your internet speed 😂😂

    • @pranav288
      @pranav288 Před 2 lety

      @@mohammedfalih8713 good one

    • @jyoshnadeepala6912
      @jyoshnadeepala6912 Před 2 lety

      Must hv watched on 1.5x

    • @aplutsharma
      @aplutsharma Před 2 lety +1

      @@mohammedfalih8713 are you mad, video length is more than 18 minutes. 35 seconds more

  • @ThePiratedSardar
    @ThePiratedSardar Před 2 měsíci +2

    I'm an international CS undergrad student in Canada and I often watch your videos to study. You are doing great work, thank you from me and some other people I know who watch your videos to pass our classes!

  • @ritikmishra3643
    @ritikmishra3643 Před 3 lety +26

    Yours is the first channel where I like the video before watching it
    That's faith ❤️
    Perhaps one day we shall have gurus like you in regular schools/colleges...

  • @ahmednkhan
    @ahmednkhan Před 6 lety +41

    You are very knowledgeable, but you are also able to explain difficult topics very easily. Thank you!

  • @jathebest2835
    @jathebest2835 Před rokem +3

    This guy's lectures' Big O of N is 1.
    No bs, straightforward teaching, effective explanations, just a perfect algo course existing online!

  • @jaydeeeep
    @jaydeeeep Před 6 měsíci +2

    Even after 5 years, cannot find a better video/teacher better than you. Thank you.

  • @muhammmadhassan6928
    @muhammmadhassan6928 Před 4 lety +2

    Watched all his videos on Data Structures in C++ and really wanted to say what an amazing teacher. No one could have explained it better than him. Thank you.

  • @Dorielle95
    @Dorielle95 Před rokem +5

    We pay so much to get our degree and honestly you are better than any professor I have had.
    Thank you for contributing to society and makin our lives easier.

  • @hamzamuslim6141
    @hamzamuslim6141 Před 2 lety +6

    I didn't study for my final until the last hour because I knew Abdul Bari will teach me everything I need to know in 20 minutes.

  • @chrisd961
    @chrisd961 Před 3 lety +19

    I love how when he turns around, his look screams - It's that fucking simple...

  • @sukhmitbhullar7181
    @sukhmitbhullar7181 Před rokem +2

    I'm binge watching your videos for no reason and I'm learning a lot. They way you teach makes it so interesting and entertaining.

  • @user-su6xu6cg1f
    @user-su6xu6cg1f Před 5 lety +66

    1 like for sir in 2019! Great way of explaining.

  • @nos5903
    @nos5903 Před 6 lety +27

    Best teacher so far found for Analysis of algorithm ,Sir you are Much far better than Our college teacher for which we engineering student pay more than 1lakh per year which I think goes waste on those college professors , Thanks a lot Sir for Your Efforts on sharing such incredible knowledge!

  • @kanyonful
    @kanyonful Před 3 lety

    Your relaxed approach at explaining algorithms at work is super unique and helpful! Most people teaching algorithms descend too much into theory before diving into the actual computation. Explaining the algorithm line by line, at a slow pace. Thank you Abdul!

  • @777giorgos
    @777giorgos Před 2 lety +2

    Legendary explanation! You sir are giving so called expert books a run for their money! I've read 2 books & other online resources on Dijkstra, yet their explanations were so convoluted. They may had nice examples but explanations were lacking. But this, oh my God. I've watched your video, then implemented your explanation in a piece of paper, I understood the steps immediately and I was able to easily translate this into code. Based on your steps I can, not only find the distance shortest between (u,v) nodes, but can evolve it also to include the path with a simple modification. All the above, including the video, took me less than 1h. I repeat, less than 1h to fully understand + implement the algorithm, in which I spend more time reading in books & online resources.
    Perfect explanation, perfect teacher, you have my deepest respect sir!

  • @anthonysoprano3444
    @anthonysoprano3444 Před 5 lety +3

    I have my exams tomorrow and i didnt even know what an algorithm is, I just stumbled upon your channel and watched a number of videos and I know for a fact that I will pass tomorrow with flying colors. Thank you Bari sir, countless of best wishes to you. You are really doing a noble job. THANK YOU!!!

  • @marcosmilan
    @marcosmilan Před 3 lety +9

    Your classes are pretty good, Mr. Bari. Greetings from Brazil.

  • @anushadatta463
    @anushadatta463 Před 4 lety +1

    All my doubts vanished in seconds! Everyone needs a teacher like you.

  • @DheerajSharma-ol3go
    @DheerajSharma-ol3go Před 4 lety +6

    started studiying 12 hours before the exams ! was in panic as i didnt had any time to study for the final exam of DAA
    but gave these series a try and now looks like i can do something in exam !
    have confidence now !
    still 2 hours to go for exam ! hope it will go good
    thankyou Abdul sir for help !

  • @harshitha4886
    @harshitha4886 Před 2 lety +7

    Normally this algorithm looks difficult by the name itself .But you explained it in very simple and efficient way. Thanks a lot sir!!

  • @stonecoldcold2941
    @stonecoldcold2941 Před 5 lety +8

    I've never seen anyone teaching DS like this. You are the Best!

  • @erceozmetin2661
    @erceozmetin2661 Před 3 lety +1

    This guy deserves respect. Better than my professor

  • @cornucopiahouse4204
    @cornucopiahouse4204 Před 2 lety +5

    I teach discrete math myself, but I must say your teaching makes it so clear! I need to learn from you!

  • @maheshmogulluri4829
    @maheshmogulluri4829 Před 2 lety +4

    Saying just thanks is not enough sir...stay happy and healthy.

  • @FBHKHAN
    @FBHKHAN Před 6 lety +77

    Best explanation. He sounds so much better at x1.5 :D

  • @MAK28031991
    @MAK28031991 Před 4 lety +1

    PERFECT is the word. Thank you sir. I always fast forward you lectures to 1.5 speed just before interviews. :)

  • @learn-o-land6759
    @learn-o-land6759 Před 8 měsíci +2

    One of the best teachers in my life. Though he is not teaching offline but the way he explains and makes the difficult topics very easy is priceless. Thank you Sir.

  • @sinaazartash3566
    @sinaazartash3566 Před 3 lety +4

    Wow. I can feel Abdul's passion for algorithms flowing. He is making learning so enjoyable.

    • @alfredomulleretxeberria4239
      @alfredomulleretxeberria4239 Před 3 lety

      I wouldn't exactly call it a "passion". Rather, I'd call it a strong commitment to a personal mission to make concepts easily understandable.

  • @dontony7071
    @dontony7071 Před 3 lety +5

    Sir your simplicity and tone is amazing.Big fan from West Bengal.

  • @thealchemist1480
    @thealchemist1480 Před 2 lety +2

    You are the most effective teacher I have ever studied from, You make things simpler.

  • @sweet23315
    @sweet23315 Před 3 lety +1

    literally studied most of my finals from this man for the past 3 years of university, thank you so much I will keep you in my prayers.

  • @talhatayyab6422
    @talhatayyab6422 Před 5 lety +3

    Sir you are teaching like flowing water; elegant!! keep it up!!!

  • @amitanshupattanayak9065
    @amitanshupattanayak9065 Před 6 lety +13

    never seen a better explanation than this

  • @yon1623
    @yon1623 Před 2 měsíci

    this video was recorded six years ago. here I am watching it and learning from it . thank you for making this video .
    From Seattle, WA USA .

  • @aaptiilangovan6663
    @aaptiilangovan6663 Před 2 lety +2

    Sir, max of the students in our class follow your explanations, even our lecturers suggest ur lectures.
    Long live sir. U are really a great help for many students

  • @dharanyuvi6951
    @dharanyuvi6951 Před 6 lety +4

    Bari, you are one of my best teachers of all time!! thanks for giving such a lecture!! you are increasing my productivity and one more to include in your video is that, kindly tell us the practical usage of each algorithms in the real world and how they are solving it!!

  • @mariapetrovska1849
    @mariapetrovska1849 Před 5 lety +180

    Why do the Uni lecturers in Australia explain it in the most confusing way? Thank you sir you are doing great.

    • @danteeep
      @danteeep Před 5 lety +26

      because they only know how to put difficult questions in tests and exams

    • @sohailape
      @sohailape Před 5 lety +33

      Indian lecturers don't even explain anything.

    • @shabbinhossain8127
      @shabbinhossain8127 Před 4 lety +16

      @@sohailape Honestly in the south asian region most of the teachers are those people who cared about grades and not about the knowledge and hates their job as well!

    • @fortnitelove8129
      @fortnitelove8129 Před 4 lety +7

      @@sohailape actually he is an indian Ph.d. Professor

    • @upendarreddymusuku8878
      @upendarreddymusuku8878 Před 4 lety +12

      @@fortnitelove8129 He has done in Masters in ComputerScience in Osmania University in Hyderabad

  • @thinhle96
    @thinhle96 Před 3 lety +1

    You are the best teacher on Data structure and Algorithm.
    Liked, Subscribed and hit the notification bell.

  • @kallihale5197
    @kallihale5197 Před rokem +1

    his on-camera teaching presence is so soothing :)

  • @alex5315
    @alex5315 Před 3 lety +3

    This man literally got me through college he’s the best

  • @smartwolf9045
    @smartwolf9045 Před 3 lety +3

    Brilliant explanation. I loved how you took only 3 vertexes first, to explain the concept

  • @sankeyprabhu
    @sankeyprabhu Před 4 lety +1

    You have some magic within you sir. The explanation seems so simple. I'm sure that I'm Never gonna be forgetting this concept. Thank you for the splendid explanation.

  • @waqarali-cz4nt
    @waqarali-cz4nt Před 10 měsíci +1

    Five Year Ago The Playlist was Uploaded
    But still no one can compete it
    Thanks Alot For Such a WonderFul Playlist For Free

  • @SajidurRahman25
    @SajidurRahman25 Před 5 lety +13

    Mr. @Abdul Bari, thank you so much for your lucid explanation, I've enjoyed it very much. One quick suggestion regarding runtime complexity analysis: since in actual implementation of Dijkstra algorithm, priority queue data structure is used to get the next node with minimum d[v] and to update d[v], and as a result, runtime comes to big-oh of O(E*log(V)), I think it'll be nice if you could make a video specifically on priority queue and how its use in different algorithms can result in better runtime. Thanks and hope to watch a video on this topic soon :)

  • @shaileeshah9448
    @shaileeshah9448 Před 5 lety +5

    I want you to be my professor, you make all concepts so easy. Thank you so very much!

  • @ashishkhatri1504
    @ashishkhatri1504 Před 3 lety +2

    you're the reason I have been able to do stuff with my Data Structure class. thanks.

  • @lman2710
    @lman2710 Před 2 lety +1

    Perfectly clear. You were able to explain me what my teacher wasn't able to do

  • @AnandKumar-wk4os
    @AnandKumar-wk4os Před 6 lety +5

    thanks sir its really very helpful for us not only that lecture but all videos. thanks again

  • @Aditya-Pathariya
    @Aditya-Pathariya Před 5 lety +6

    I have my exam tomorrow and that was an absolute treat to watch 😃

  • @MiddleCross378
    @MiddleCross378 Před 3 lety +1

    I wish you were my algorithm analysis professor. Your explanations are clear and to the point, thank you for your videos.

  • @shaukeentrendz4384
    @shaukeentrendz4384 Před 2 lety

    You teach so well. So easy to understand in comparison to so many other academics. Thank you. Very grateful

  • @PreetiSingh-ko7dm
    @PreetiSingh-ko7dm Před 6 lety +12

    thank u so much sir.
    u cover little things of other topics in single lecture..
    really awesome...

  • @Dipubuet
    @Dipubuet Před 2 lety +2

    precise and elaborate lecture at the same time! In a word- Amazing

  • @yas2657
    @yas2657 Před 2 lety

    I would sell my soul to have the calmness that you have in the manner you speak.

  • @saint_lunatic
    @saint_lunatic Před 4 lety +3

    Sir, i have an exam after an hour, you're saving my life, remember that! you're an absolute hero! LOL

  • @mubarekmohammed468
    @mubarekmohammed468 Před 2 lety +3

    Trust me or not....I got an A+ at msc cs course in ds and algorithm course with your videos help.
    With your methods, even a 10-year-old can understand algorithms and ds.
    I have no words....LEGEND!..LEGEND!...LEGEND!!..You are my second favorite Indian next to Udit Naryan. : )

  • @kiruthikabalaji5780
    @kiruthikabalaji5780 Před 3 lety +1

    Great teaching!.. and he never showed off that his videos have reached 1M views and never insisted the viewers to subscribe his channel

  • @SarinRahmanZavin
    @SarinRahmanZavin Před 2 lety +2

    If i get A on my algo course i will pray for you my entire life...

  • @ishworupreti4713
    @ishworupreti4713 Před 5 lety +3

    Thank you DAA turorials.I passed my exams just by watching your video :)

  • @TharaMesseroux1
    @TharaMesseroux1 Před 2 lety +3

    You were great Abdul! You explain very well. Thank you!! May God bless and protect you and your family.

  • @tanmaybhatt226
    @tanmaybhatt226 Před 3 lety +2

    Sir your videos are a golden mine for understanding concepts of DSA.
    Your teaching style is one of a kind and it is extremely convincing and easy to understand
    Thank you so much

  • @sameenarshad4145
    @sameenarshad4145 Před 2 lety

    i literally didnt take one physical class properly cause my instructor was the worst, but you sir just explained my whole syllabus in a matter of minutes.
    mad respect sir
    thanks alot

  • @Vinay49360
    @Vinay49360 Před 4 lety +4

    After seeing your lectures, I'm in wonderland sir😃😃. How beautifully you have explained everything 😃 Amazing work sir. We are grateful to you 🙏🙏🙏 I see God in you , sir. Lots of love❤❤❤❤

  • @SachinDolta
    @SachinDolta Před 6 lety +15

    great video , please make these implementation in programs too.

  • @ruhinapatel6530
    @ruhinapatel6530 Před rokem +1

    Sir, You are the one and only one legend who made DSA understandable to human kind..

  • @emmanuel8296
    @emmanuel8296 Před 3 lety +2

    coming from a Petroleum engineering background..Bari is a legend..live forever sir

  • @mikeoo2975
    @mikeoo2975 Před 6 lety +7

    You are a born teacher sir!!!!

  • @user-mp3wv2zy5n
    @user-mp3wv2zy5n Před 3 lety +4

    You are the best teacher, the most handsome guy on algorithm I've ever seen.

  • @saiashok28
    @saiashok28 Před rokem

    I wish you were my professor when I studied. The way you teach, students no need to refer any books for exams. I found your channel recently. Thanks for your time and passion teaching. God bless you!!!

  • @advaithsahasranamam6170
    @advaithsahasranamam6170 Před 4 měsíci

    Great job, Dr. Bari! I am a computer science student studying in the U.S. - and your videos are super helpful! Many of them explain concepts better than my professors!

  • @danialahmed5168
    @danialahmed5168 Před 5 lety +9

    You are far better then my professor at FAST love u

  • @syedsaifahmed4103
    @syedsaifahmed4103 Před 5 lety +3

    Thank you soo much sir. It helped me a lot To understand algorithms. 🙏🙏🙏

  • @sandeshparajuli5346
    @sandeshparajuli5346 Před 2 lety +1

    Best Lecture On CZcams For Huffman Coding.

  • @dparikh1000
    @dparikh1000 Před 6 měsíci

    Abdul is the man! I go to a well known CS school, and his explanation of Dijkstra is about 1000x better than what I learned in class.

  • @panyalamadhavi8295
    @panyalamadhavi8295 Před 4 lety +4

    Your the best teacher i have never seen in my academic life..salute to u sir...i can proudly say ur the great teacher..😊

  • @abhinavraut3099
    @abhinavraut3099 Před 5 lety +87

    ABDUL SIR FOR PRIME MINISTER :D

  • @idiot7leon
    @idiot7leon Před 4 lety

    Thanks very much!
    I like your courses being so DRY/CONDENSED!

  • @swanseaTN19vlogs
    @swanseaTN19vlogs Před měsícem +2

    after completing my masters in uk which iam currently pursuing i will mention how his video made me pass exams in the conference for sure.
    Much love from UK

  • @jayavallabbeshk4831
    @jayavallabbeshk4831 Před 4 lety +4

    Sir, tomorrow I'm having my end semester examination in data structures & algorithms. Your video helped me a lot sir. Thank you sir 🙏🏻🙏🏻. You are a legend sir. Please upload more videos sir🙏🏻