Floyd Warshall Algorithm | Full Detail | Samsung | Graph Concepts & Qns - 32 | Explanation + Coding

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

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

  • @mohithadiyal6083
    @mohithadiyal6083 Год назад +12

    Best explanation 👍

  • @AlishaKhan-ww3io
    @AlishaKhan-ww3io Год назад +10

    Shared this channel to my whole college friends

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

    Best Tutorial but very much underrated. Appreciate your work.

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

    I binge watched this whole playlist and this is the best graph playlist I ever found online

  • @letsdebug
    @letsdebug 4 месяца назад +3

    Via part made this algo super easy, awesome way to teach algos!!!

  • @AbhijeetMuneshwar
    @AbhijeetMuneshwar 7 месяцев назад +3

    I never thought that Floyd Warshall algorithm will be this simple !!!
    Thanks for amazing explanation, MIK Sir 🙏

  • @AnkitAnshu-j7r
    @AnkitAnshu-j7r Год назад +4

    Super Crisp explanation..binge watched whole series kind of addicted to your explaination 😍

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

      Wow.
      Thanks a lot for binge watching ❤️❤️😇😇

  • @dcsRituMEHTA
    @dcsRituMEHTA 2 месяца назад +1

    It's always refreshing to learn from your videos!!!!

  • @satendra6200
    @satendra6200 8 месяцев назад +1

    Brother i have seen striver's video on this , but your is Best , most underrated channel on DSA

  • @emgineer_ak3301
    @emgineer_ak3301 2 месяца назад +1

    the best part of every vdo is first 1 min

  • @sunnyvlogs__
    @sunnyvlogs__ 9 месяцев назад +5

    Floyd bhaiya bahut tezz the🔥🔥

  • @ShubhamSingh-dz2ug
    @ShubhamSingh-dz2ug 19 дней назад +2

    god level explanation bro.

  • @rishisoni3386
    @rishisoni3386 5 месяцев назад +1

    Okay, either this was easy or you are a great teacher. Win-Win for me😁😁

  • @pradyumnmulegaon385
    @pradyumnmulegaon385 8 месяцев назад +1

    this is most underrated channel , he teaches amazing man 😀😀

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

    awesome explaination till now on youtube

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

    thank you bhaiya .. after watching your videos now I don't just solve problems but I can write clean code

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

    The motivation in the start 🔥🔥

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

    The best explanation . Waiting eagerly for the next video on this playlist.

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

    This is like a brute force approach to find the shortest distance. Even if we want to find the shortest distance between every pair of vertices, Dijkstras still does the job in VElogV which is less than Floyd warshall.

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

    Hats off to you for this amazing explanation !!!!!

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

    Best resource on internet

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

    32/40 done ✅ thanks a lot bhaiya❤✌

  • @sandhyaratan6546
    @sandhyaratan6546 Год назад +5

    Thank u so much for detailed playlist.
    Can u also explain 847 leetcode using this approch

  • @lofireverbz-wy7go
    @lofireverbz-wy7go 11 месяцев назад +1

    sab kuch sahi chlra tha but bhaiya time complexity ne apni aukaaat dikha di :)n^3

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

      Ha ha. 🤣 Yeah. But many times, in contest qns, for small test cases Floyd Warshall comes to rescue 😍

    • @lofireverbz-wy7go
      @lofireverbz-wy7go 11 месяцев назад +1

      yes bhaiya ! thanku for your crystal clear explanation@@codestorywithMIK

  • @JJ-tp2dd
    @JJ-tp2dd Год назад +4

    Thank you so much bhai..Can't appreciate you enough ❤💙❤ Java Implementation:
    class Solution
    {
    public void shortest_distance(int[][] grid){
    int n = grid.length;
    //convert -1 to infinity --> easier min calculation
    for(int i=0; i

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

    keep it up bhai

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

    Very helpful ❤

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

    A little different implementation
    class Solution {
    public:
    void shortest_distance(vector& arr){
    int n = arr.size();
    for (int via = 0; via < n; via++) {
    for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
    if (arr[i][via] != -1 && arr[via][j] != -1) {
    int new_cost = arr[i][via] + arr[via][j];
    if (arr[i][j] == -1) {
    arr[i][j] = new_cost;
    } else {
    arr[i][j] = min(arr[i][j], new_cost);
    }
    }
    }
    }
    }
    }
    };

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

    32/41 DONE [7.12.23] ✅✅

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

    sir, please also share this notes that you prepare during the lecture.. for faster revision ...

  • @shubhamgupta-w1p
    @shubhamgupta-w1p 27 дней назад +1

    do you know sometimes your bhashad is exactly i wanna hear at that moment

  • @molyoxide8358
    @molyoxide8358 5 месяцев назад +1

    Scary things Made Easy by MIK

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

    Bhaiya,yeh jo negative edge cycle vali dikkat hai yeh sirf jab i aur j ki value same hai tabhi encounter hogi??? doosre vertices ke liye negative edges ke case mein yehi dikkat nhi hogi kya??

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

    i understood , but what is the derivation or intiuation for it,
    matlab floyd uncle ne aisa kaise soch liya...would be interesting to know

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

    hello mik, mai is year ke starting se roz kr raha hu questions , confidence bhi aagya hai kyuki mostly questions ban rhe hai aajkal mid-high level me , but chance nhi mil raha yaar kahi pe , interview tak hi agar na pohch paau to kya fayda dsa aane ka

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

      Hi Kartik,
      Trust me , we all have been there.
      Everyone have faced this. But the motive is to never stop,
      You will definitely reach your goal. Rise and don’t stop ❤️

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

    thanks

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

    Class solution {
    Public void shortest _dis(int [][] matrix){
    int INF=interger. MAX-VALUE, n=matrix. length;
    for(int i=0;i

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

    this is unknowingly bottom up dp.

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

    इस को रट्टा लगवाना कहते है😂😂😂😂😂😂, बस steps रट लो और लो हो गया😂😂😂😂😂और कॉमेंट्स सब तालिया भी बजा रहे है 😂😂😂😂😂