L-5.8: Floyd Warshall Working with example | All Pair Shortest Path Algorithm

Sdílet
Vložit
  • čas přidán 6. 09. 2024

Komentáře • 282

  • @grindxignite
    @grindxignite Před rokem +70

    You can also use the previous table for the minimum weight here. for example in D4 if we want [3:2] we can search for values of [3:4]+[4:2] from previous table(i.e D3)

    • @pramantomar822
      @pramantomar822 Před rokem +9

      This would be more easy, thank u

    • @dailydoseofmath
      @dailydoseofmath Před rokem +7

      yes that's what you should do , suppose you had 6-7 edges then his method will take forever

    • @DineshKumar-nm2jh
      @DineshKumar-nm2jh Před 11 měsíci +1

      true

    • @ayushiyadav1
      @ayushiyadav1 Před 3 měsíci

      yosh good way to tackle this problem. thnx bro!!!

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

      Indeed a Very fast way , but Might not always give the minimum result in everycase
      e.g in the same D4 matrix , if we want to go from 1:3 via 4
      Then 3:4 + 4:3 of d3 gives 5+3=8 which is not the shortest path , but 3 is the shortest path

  • @mujaffarbhati4750
    @mujaffarbhati4750 Před 2 lety +163

    Person is God Literally watch his videos as last minute and I bet your topics will be covered as quick as a wink.

    • @Sayyed_Sana
      @Sayyed_Sana Před 2 lety +15

      God
      یعنی خدا
      مسلمان اللہ تعالیٰ کے سوا کسی کو بھی خدا نہیں کہتے میرے بھائی
      پلیز یہ کمنٹ delete کردیں پلیز
      Just for correcting you dear brother۔۔۔I'm not criticizing you۔۔۔pleasedon't mind
      And if you want to see explainatiion then
      یہ کتاب دیکھ لیں ایک بار پلیز بھائی 🙏🏻👇🏻
      "کفریہ کلمات کے بارے میں سوال جواب"
      شکریہ بھائی

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

      @@Sayyed_Sana you are right.

    • @waron1240
      @waron1240 Před rokem

      ​@@Sayyed_Sana tum bewkoof hi rahoge uska matlab tha ki sir ne itna accha padaya ki esa laga iswar ne padaya h. Tumari buddhi sahi me ghutne me h

    • @Abdul_Rahman11
      @Abdul_Rahman11 Před rokem +5

      There is no god except Allah ❤️

    • @rameenzubair4787
      @rameenzubair4787 Před rokem +3

      I testify that there is no God except ALLAH and Prophet Muhammad SAW is His last messenger.

  • @rafsanmaruf2066
    @rafsanmaruf2066 Před rokem +24

    Your explaination technique and expression is very cool and fantastic. I am using your style to explain anything. Thank you.

  • @alphagam3r933
    @alphagam3r933 Před rokem +22

    sir like literally you are the greatest, Tomorrow is my discrete math exam and i've already done all the topics except this one, so sir once again thank you thank you so much, Teachers like you should be in every single college in india, 😭❣❤

    • @manoz.881
      @manoz.881 Před rokem +1

      same like mine thank you sir

    • @user-kg4dj7yy8x
      @user-kg4dj7yy8x Před 7 měsíci

      Mujhe samjh ni aaya ya samjhya sahi ni h .....🙄 Y topic clear ni hoga iska matlab mera bcz m to aap pr hi depend hu

  • @mohammadtofiqulislam1868
    @mohammadtofiqulislam1868 Před 4 měsíci +3

    Came with zero knowledge, leaving with confidence and proper explanation!! Thank you sir

  • @pranjalck
    @pranjalck Před 2 lety +15

    Now by your teaching, i am gaining confidence in this subject 🙅🏻‍♂️🥋

  • @codexcelai.
    @codexcelai. Před 2 lety +12

    All my doubts are cleared by your video you are best teach thank you so much☺❤

    • @aakashchari600
      @aakashchari600 Před rokem

      use doubt nahi bolte aapko topic hi nahi aata tha na

  • @fxaawan1640
    @fxaawan1640 Před 2 lety +14

    DIVIDED BY BORDERS
    UNITED BY CZcams
    Lots of respect and
    LOVE FROM PAKISTAN❤❤ I saw many videos of u n you explained each n everything very well specially that analysis of algorithm's topic. keep doing this always n God bless u always😊😊
    FUN FACT: YOU RESEMBLE CRICKETER HARDIK PANDYA😉 😀

    • @RB-rocks
      @RB-rocks Před rokem +2

      hardik or KL rahul?? lol

  • @vikashdagar7225
    @vikashdagar7225 Před 3 měsíci +53

    Today is my final exam DAA

  • @Mahin067
    @Mahin067 Před 3 měsíci +1

    If you didn't exist, I wouldn't have passed my BSc i Engineering. You're making this world a better place, sir. Love from Bangladesh.

  • @ksingh8831
    @ksingh8831 Před rokem +14

    Tomorrow is my exam 😂 and iam coming for the study

  • @anjanadevi8070
    @anjanadevi8070 Před 3 lety +51

    . Excellent class...One suggestion for improving speed. while manual calculation.It will be easy to observe the just previous matrix corresponding cell values instead of scanning the graph each time for better path. Already the min possible values between 2 nodes are updated and entered in the previous matrix. Therefor no need to again get the values through complete possible options from the graph.

    • @sumitsihag786
      @sumitsihag786 Před 3 lety

      Yes mam u r right

    • @rakibhasan2552
      @rakibhasan2552 Před 2 lety

      I was thinking about it before seeing the comment. But I was not sure whether will that work every time or not! Thank you ma'am for clearing my doubt.

    • @MANISHKUMAR-fr8eh
      @MANISHKUMAR-fr8eh Před 2 lety +3

      Yes you are right, always we have to see previous matrix instead of seeing graph everytime.

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

      Very true. It actually defeats the purpose of algorithm.

    • @manthankurhekar3752
      @manthankurhekar3752 Před rokem +1

      Indeed that's basically the essence of the algorithm. Avoiding re-visit to already calculated answer

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

    U are the best teacher thank u so very much God bless u sir

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

    For 2 years straight I didn't have courage to solve floyad warshall and TSP but coz this video I am confident

  • @xyz-pc3tl
    @xyz-pc3tl Před 2 lety +6

    Thanks a lot sir for your all hardwork 🙏🙏🙏

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

    Thank you sir for explaining so nicely!
    Have my exam tomorrow 🙏🙏

  • @Abdul_Rahman11
    @Abdul_Rahman11 Před rokem +3

    Thanks you 🙏 sir your explanation is fantastic..

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

    Perfectly explained👌.

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

    Thnq so much... Itna atche se samjhane ke liye...

  • @amitmaity9374
    @amitmaity9374 Před rokem +1

    Today is my cbsc exam and I can complete this unfinished chapter thanks to you. Thanks sir❤

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

    ur all videos are excellent thank you sir love from Pakistan

  • @priyankabansode8702
    @priyankabansode8702 Před 3 lety +13

    Thank you sir , All concept clear 😊

  • @I_am_Suraj2
    @I_am_Suraj2 Před měsícem

    This man saves many people's life more than doctors 😅😅

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

    MySQL ka couse ❤️❤️❤️. I like your explanation along with example

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

    Omg thanku so so much for explaining this now my concept iss Soo clear by watching this❤️

  • @Divya-bp8vy
    @Divya-bp8vy Před rokem +1

    I have no words for thanking you sir

    • @ayushpanwar3536
      @ayushpanwar3536 Před rokem

      Maybe just say "THANK YOU". That ought to summarise it.

  • @CrickyFizzz
    @CrickyFizzz Před rokem +2

    thank you so much SIR❤

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

    This is teacher very very Good sir
    I am very very undersand sir
    Thank you so much sir

  • @MrAditya-xm1pn
    @MrAditya-xm1pn Před rokem +1

    Thanks sir for amazing study experince.
    Literally nailed it SIR.

  • @cartoonlover6010
    @cartoonlover6010 Před rokem +1

    Thank you so much sir ji what great lecture❤❤ you had served us thank you again for this kind of important knowledge .

  • @sakshamsinghrajput22
    @sakshamsinghrajput22 Před měsícem

    Excellent #explaination by #gatesmashers 🇮🇳

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

    Thank you so much I have exam today and this help me alot 💕

  • @Neha-ul2jt
    @Neha-ul2jt Před 2 lety +3

    Thanku sir ......
    All concept clear💯🙂👍

  • @BhagatBhutale..
    @BhagatBhutale.. Před 6 měsíci +1

    Video is useful 👍

  • @Shivanisharma-mi7gy
    @Shivanisharma-mi7gy Před 2 lety +3

    I am very happy by seeing your all videos i have literally feel you are god of cs❤️😁

  • @funandtechby08
    @funandtechby08 Před rokem +2

    Thank you sir ❤️
    Very easy explanation

  • @AadeshingaleOfficial-zl5fd
    @AadeshingaleOfficial-zl5fd Před 3 měsíci +1

    Nice Sir 😊

  • @BipashaPal-qr6yh
    @BipashaPal-qr6yh Před měsícem

    Sir ur explanation is so clear

  • @XZYA4FHS59OP
    @XZYA4FHS59OP Před měsícem

    Fantastic and easy to learn ❤

  • @mufassirsayyed1882
    @mufassirsayyed1882 Před 8 měsíci +1

    Thank you so much sir🫡

  • @aradhanamurarka2949
    @aradhanamurarka2949 Před rokem

    Best teacher in the history of computer science

  • @dance_zealous
    @dance_zealous Před 8 měsíci

    Thankyou so much sir for such clearing concept videos that is also at free of cost🙏🙏

  • @Supercool7042
    @Supercool7042 Před 2 lety

    you are gold for our backbenchers

  • @nayandudhat4635
    @nayandudhat4635 Před rokem +1

    Thank you so much sir bahut aacha samjaya 🙏🙏

  • @TradewithAmmad
    @TradewithAmmad Před 21 dnem +1

    I used to watch your videos , today I saw my professor taking you lecture 😅😂

  • @rockiggo
    @rockiggo Před 2 lety

    Super,mindblowing,fantastic.

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

    Sir very helpful vedio lecture 🙏

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

    beautiful explanation

  • @manjurawat1826
    @manjurawat1826 Před rokem +6

    sir in D1 matrix , the 4-3 = 9 || but shortest path is 4-2 & 2-3 = 2+1 = 3... which one is correct?

    • @deepak.k9415
      @deepak.k9415 Před rokem +3

      in D1 we have to use only the 1st vertex(1), we cant use 2

  • @hafizasairakanwal6705
    @hafizasairakanwal6705 Před 2 lety

    Awesome sir g bohat zaberdast ap smjaty hy😇

  • @pratyushtripathi1728
    @pratyushtripathi1728 Před 7 měsíci +1

    Maza aa gaya re baba 😂

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

    Thank you sir really good explanation

  • @searchengine6925
    @searchengine6925 Před 2 lety

    you are the great bro .life savior

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

    JazakAllah (May Allah reward you)

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

    Great sir ...all concepts clear...

  • @anshikasrivastava1295

    Marvellous xplaination salute to sir

  • @PanchamAgarwal
    @PanchamAgarwal Před rokem

    very best teaching way

  • @Rakshuuu_07
    @Rakshuuu_07 Před měsícem

    Lagta hai baghwan ne apko hamare liye hi beji hein🥳 I have exams tmrw and mein pass ho jaungi😎 thanku sir🤗

  • @user-eb4ym8il2w
    @user-eb4ym8il2w Před 7 měsíci +7

    Jay shree ram

  • @vishugaming4024
    @vishugaming4024 Před rokem

    Great way of explainning

  • @Hasnain_K_fans
    @Hasnain_K_fans Před 3 měsíci

    Best VideoSir i am from Pakistan 🎉

  • @AVGLOKI1122
    @AVGLOKI1122 Před rokem

    Path bangaya hai sir mere dimag tak ❤

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

    Very nice explanation ❤

  • @oudarjatanmoy384
    @oudarjatanmoy384 Před 3 lety

    Great great sir from bangladesh. Sare doubt clear hogaye.

  • @than0s869
    @than0s869 Před 2 lety

    best explanation.. :) Thank you sir

  • @yashvijaybombale6896
    @yashvijaybombale6896 Před rokem +1

    13:28 for(4-1)we can also go through (4-3)and (3-1)that is 9+4 which is less than infinity so why u go through ?(4-2)and (2-1)??

  • @carnagegaming711
    @carnagegaming711 Před 11 dny

    Thank you ❤

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

    Thank you ❤️

  • @33_it_divyadeepbansal56

    wonderfully taught

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

    Loo jiii....great explanation 👍

  • @MrKP-nm3qy
    @MrKP-nm3qy Před rokem +1

    Genuine Guru ji 🌝🌝

  • @nu...123
    @nu...123 Před 2 měsíci

    Thank you sir ❤

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

    Thank you Sir ❤️

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

    thank you sir 🙏🙏🙏

  • @avdheshpal1
    @avdheshpal1 Před 4 měsíci +1

    15:35 major and important doubt of every student

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

    subscribe bahut jaruri h nice dialog

  • @habibjan1203
    @habibjan1203 Před 2 lety

    Thanks sir I am from Pakistan big fan you sir😊

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

    Great as always 🙂

  • @adityakushwah623
    @adityakushwah623 Před rokem +1

    Semester saver....🔥

  • @sangramsahu1931
    @sangramsahu1931 Před 2 lety

    Thank you again sir❤️

  • @user-ol3gs7nf2v
    @user-ol3gs7nf2v Před 3 měsíci

    Thank you sirr 😊

  • @adityabhattacharyya5971

    fu**ing awesome explanation !!! amazing teacher

  • @riazahmed8290
    @riazahmed8290 Před rokem +1

    Why we use this Algo as we already have Dijkstra or bellman ALGO?

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

    too good Sir!
    👏

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

    Thanks 👍😊

  • @shivambhanu2757
    @shivambhanu2757 Před 2 lety

    Very very helpful.

  • @Sonu-jx6jl
    @Sonu-jx6jl Před 2 lety +1

    Thanks sir ❤

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

    9:14 sir ham 4 se 2 or fir 2 se 3 jate tb to minimum path milta hame jo ki 9 se kam hota

  • @user-ed9lr9ku4r
    @user-ed9lr9ku4r Před 5 měsíci

    Varun sir respect button 🔘😎

  • @professorpoke
    @professorpoke Před rokem +1

    Watching this video at 10:05. My exam started at 10:00 i.e. 5 min ago.

  • @milton2345
    @milton2345 Před rokem

    Thank you so much sir

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

    Thanks sir 😁💛

  • @cricketwithpriyan
    @cricketwithpriyan Před 10 měsíci

    Great learning

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

    Thanks sir ❤

  • @zahid_9217
    @zahid_9217 Před rokem

    Finally more than two hours got it.

  • @BishnuPasa
    @BishnuPasa Před 2 lety

    best one sir thank you

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

    I think this video has an error. When you are building a table you look at previous table NOT original graph. So if you are building D4 table and want to know 1-3. The answer will be min of:
    D2[1,3] or (D2[1-2]+D2[2-3]).
    The instructor is using original graph for computing [1-2] [2-3]. This is wrong and may have worked in this example but will fail test cases on leetcode.
    Note original graph is also D0.

  • @durgfestivalvibes
    @durgfestivalvibes Před 2 lety

    Thankyou very much sir

  • @accute142
    @accute142 Před měsícem

    subscribers bht jaroori hai ,,,,the most funniest line .i like it when sir say this ....

  • @pravardhan0308
    @pravardhan0308 Před rokem +1

    [D1 ]In 1st row 1 to 3 we can travel with 9 < ♾️ infinity ....
    1 to 2 is 8
    2 to 3 is 1
    But why did you considered it as infinity ♾️
    My ans : via 1 there is option
    Is it correct?

    • @satyanarayandalei-rz2kw
      @satyanarayandalei-rz2kw Před rokem +1

      Really I was looking for this comment. I also think so. We can go 1 to 3 via 2

    • @nithinrajjakkulagmailcom
      @nithinrajjakkulagmailcom Před rokem

      @@satyanarayandalei-rz2kw no in D1 we can only travel through 1 , and in D2 through 1 and 2 , D3 1,2,3 , lastly in D4 we go any way like all can be visited like you dont need to travel whole graph , by comparing before matrix u need to find best and minimum cost