Minimum Cost Walk in Weighted Graph | Thought Process | DSU | Leetcode 3108 | codestorywithMIK

Поділитися
Вставка
  • Опубліковано 2 січ 2025

КОМЕНТАРІ • 33

  • @codestorywithMIK
    @codestorywithMIK  9 місяців тому +4

    DSU - ua-cam.com/video/AsAdKHkITBQ/v-deo.htmlsi=KIFBRgFo35-2-Vb7
    DSU By Rank and Path Compression - ua-cam.com/video/iH3XVIVzl7M/v-deo.htmlsi=WExx9fFGcCHPVmzw
    DSU By Size and Path Compression - ua-cam.com/video/kGv33AiGhdc/v-deo.htmlsi=ubpr2mPS-yWIzKGG
    Thank you all

  • @quantum_engineering
    @quantum_engineering 9 місяців тому +16

    Bhaiya , I got the placement Thank you ❤

    • @DevOpskagyaan
      @DevOpskagyaan 9 місяців тому +1

      Congratulations 🎉

    • @codestorywithMIK
      @codestorywithMIK  9 місяців тому +4

      Many Congratulations 😇🥳🥳🥳🎉🎉🎉enjoy

    • @Sumit-wy4zp
      @Sumit-wy4zp 9 місяців тому

      Company name ??

  • @atheisth2373
    @atheisth2373 9 місяців тому +1

    Your way of explanation is really Awesome....great respect sir

  • @anuppatankar4294
    @anuppatankar4294 9 місяців тому +2

    Great video 👌🏻

  • @dayashankarlakhotia4943
    @dayashankarlakhotia4943 9 місяців тому

    Good explanation 🎉❤

  • @muskangupta7522
    @muskangupta7522 7 місяців тому

    I am confused when a node is connected to another node via 3-4 direct routes, how to have intuition for that?

  • @tutuimam3381
    @tutuimam3381 9 місяців тому

    Amazing explanation

  • @meshvpatel6112
    @meshvpatel6112 9 місяців тому +1

    Thanks A lot ❤❤
    I write Union_by_size but it don't work on some test case !!
    Why??

    • @yashsingh3177
      @yashsingh3177 25 днів тому

      did you understand why union by size didn't work ?

  • @dipalisharma4682
    @dipalisharma4682 9 місяців тому

    bhaiya gfg k bhi potd bnaya kro naa

    • @EB-ot8uu
      @EB-ot8uu 9 місяців тому +1

      Sunday mana dene do bhai sir ko 😂
      jokes apart, do you also solve GFG POTD and Leetcode POTD daily ?
      Is that helpful ? SHould I also start

    • @dipalisharma4682
      @dipalisharma4682 9 місяців тому

      @@EB-ot8uu Yeah I have started and it helps

    • @abc-ym4zs
      @abc-ym4zs 9 місяців тому

      @@dipalisharma4682 how to do continously as we are not getting results early we have to do dsa dialy for 1 to 2 years and also development any suggestions how to do dialy

    • @JatinGupta-ze6nc
      @JatinGupta-ze6nc 8 місяців тому

      @@dipalisharma4682 same it helps

  • @Abhi_008
    @Abhi_008 8 місяців тому +2

    5 = 00000101
    -1 = 11111111
    -------------------------------
    AND = 00000101

  • @User-student-404
    @User-student-404 9 місяців тому +1

    bhaiya topmate session kab loge ?
    i need it i left dsa in between from 1.5 month i use to code daily along with u . myself shreyash i use to comment daily but i feel lost but now want to start again just need your guidance once.
    plzz bhaiya max 10-15 min call with u

  • @manimanohar_001
    @manimanohar_001 9 місяців тому

    Bro make BIT MANIPULATION playlist soon 🙏😎

  • @abc-ym4zs
    @abc-ym4zs 9 місяців тому

    bhaiya any suggestion i am i third year felling nervous and tension and now i am thinking to aim for tcs digital or prime i am not feeling confident of cracking other companies since i dont have any friends i may not clear OA but in tcs only aptitude and little bit of coding so what u suggest bhaiya

    • @codestorywithMIK
      @codestorywithMIK  9 місяців тому

      Please go through this Guide video once - it will help you get started on how to study - ua-cam.com/video/2Jshfog1ETg/v-deo.htmlsi=sFf3YDaBGfWmJBm8

  • @JatinGupta-ze6nc
    @JatinGupta-ze6nc 8 місяців тому

    bhai upar se gya bhai bhai ye bilkul smjh ni aya kya kru

    • @codestorywithMIK
      @codestorywithMIK  8 місяців тому

      Hi Jatin,
      Have you studied DSU ?
      If Not, I will suggest you to watch my DSU video, then this will become easy ❤️❤️
      ua-cam.com/video/AsAdKHkITBQ/v-deo.htmlsi=1pZjPgkBWMqfM20n

  • @manimanohar_001
    @manimanohar_001 9 місяців тому

    First view

  • @devmadaan5146
    @devmadaan5146 8 місяців тому

    bro ek cheez ko baar baar explain ere ho na toh confusion aur increase kerte ho tum!! just explain the solution and move on!! News nhi chl rhi jo baar baar same cheez ko repeat kerte rehte ho

    • @codestorywithMIK
      @codestorywithMIK  8 місяців тому +1

      Hi dev,
      I appreciate your feedback. Thank you and I will definitely try to work in this. I usually repeat for the sake for super beginners.
      Thanks ❤️❤️

    • @devmadaan5146
      @devmadaan5146 8 місяців тому

      Sorry , if I was rude,
      Just dimaag kharab ho gya tha
      Hope you understand ❤

    • @adityaanand5500
      @adityaanand5500 7 місяців тому +2

      You can easily skip the part which you know, there is no need for this comment, jayada dimag khrb hota h to khud solve kia kr. He is not making vedios just for you. He is the best person I know so far jiski explanation or code same hoti h.
      When I approached this ques I initially thought of djikstra's algo, then I thought in djisktra's you can't visit the edge multiple times means it will not be part of the shortest path. I admit I didn't give much time to solve this question, after very minutes I jump to this vedio, but I was not thinking of DSU or & operation at all. This vedio made me realize that really fundamentals are everything.
      I request @codestorywithMIK to not change the way you are teaching and please ignore these types of comments.

    • @adarshjha5126
      @adarshjha5126 5 місяців тому +1

      @@devmadaan5146 Bhai nhi padhna to mat padh bhai
      Skip kar de uss part ko

    • @unknown47896
      @unknown47896 4 місяці тому

      bro..u can skip the part you already know...mik's explanation is for beginners who have difficulty in understanding...I request mik not to change your teaching style

  • @debayanbiswas8569
    @debayanbiswas8569 3 місяці тому

    class Solution {
    public:
    vectorparent;
    vectorrank;
    int find(int x){
    if(x==parent[x]){
    return x;
    }
    return parent[x]=find(parent[x]);
    }
    void Union(int x,int y){
    int x_par=find(x);
    int y_par=find(y);
    if(x_par==y_par)return;
    if(rank[x_par]>rank[y_par]){
    parent[y_par]=x_par;
    }else if(rank[x_par]