Minimum Height Trees | LeetCode 310 | C++, Java, Python

แชร์
ฝัง
  • เผยแพร่เมื่อ 15 ต.ค. 2024
  • LeetCode Solutions: • LeetCode Solutions | L...
    Github Link: github.com/Kno...
    *** Best Books For Data Structures & Algorithms for Interviews:*********
    1. Cracking the Coding Interview: amzn.to/2WeO3eO
    2. Cracking the Coding Interview Paperback: amzn.to/3aSSe3Q
    3. Coding Interview Questions - Narasimha Karumanchi: amzn.to/3cYqjkV
    4. Data Structures and Algorithms Made Easy - N. Karumanchi: amzn.to/2U8FrDt
    5. Data Structures & Algorithms made Easy in Java - N. Karumanchi: amzn.to/2U0qZgY
    6. Introduction to Algorithms - CLR - Cormen, Leiserson, Rivest: amzn.to/2Wdp8rZ
    *****************************************************************************
    Minimum Height Trees | Leetcode 310
    Facebook Coding Interview question,
    google coding interview question,
    leetcode,
    Minimum Height Trees,
    Minimum Height Trees C++,
    Minimum Height Trees Java,
    Minimum Height Trees python,
    Minimum Height Trees solution,
    310. Minimum Height Trees,
    #CodingInterview #LeetCode #Google #Amazon #Graph #tree

ความคิดเห็น • 22

  • @artemilyasov6446
    @artemilyasov6446 3 ปีที่แล้ว +9

    Great explanation. One note is that your mouse cursor is not visible so when you pointing to something like a node in a tree it is hard to guess what node you are talking about.

    • @KnowledgeCenter
      @KnowledgeCenter  3 ปีที่แล้ว

      Thanks for letting me know.

    • @testshar2117
      @testshar2117 3 ปีที่แล้ว +2

      @@KnowledgeCenter Seems you just listened and ignored. I found the same thing in your recent largest area rectangle problem too

  • @vartikasinghania9723
    @vartikasinghania9723 3 ปีที่แล้ว +2

    great explanation.... I wouldn't have done this without this video..... thank you :)

  • @ragingpahadi
    @ragingpahadi 2 ปีที่แล้ว +1

    Great explanation !

  • @maheiramkhan
    @maheiramkhan 3 ปีที่แล้ว +1

    for(auto &a: adj[node]){
    adj[a].erase(node);
    if(adj[a].size()==1)
    Q.push(a);
    }
    I have trouble understanding this line, sir. Please help.
    for(auto &a: adj[node]) is iterating through the elements of the set at location 'node'. Is that right?

    • @KnowledgeCenter
      @KnowledgeCenter  3 ปีที่แล้ว

      node is a node in Queue, which we popped. It was a leaf. adj[node] means neighbors(in fact neighbor) of node(leaf). Try without for loop. node should have just 1 neighbor.

  • @testshar2117
    @testshar2117 3 ปีที่แล้ว +3

    10:45 ---- > this, this , this ???? Kahan ho bhai?

  • @palakchawla6396
    @palakchawla6396 3 ปีที่แล้ว +1

    Good explanation 👍👍

  • @rizwanghaffar24able
    @rizwanghaffar24able 3 ปีที่แล้ว +1

    Great explanation

  • @NikhilAsawadekar
    @NikhilAsawadekar 6 หลายเดือนก่อน

    Your cursor is not visible in 90% cases. Too tough to figure out what's going on.

  • @sahilchoudhary1473
    @sahilchoudhary1473 3 ปีที่แล้ว +1

    great sir

  • @algorithmimplementer415
    @algorithmimplementer415 2 ปีที่แล้ว

    I am a bit distracted by the background noise of the video. Seems like baby is crying, or hounds. Pretty spooky.

  • @mazharuddin3647
    @mazharuddin3647 8 หลายเดือนก่อน

    confusing pointer
    , ruined the explanation

  • @saharamanson1970
    @saharamanson1970 3 ปีที่แล้ว

    Where is Prim's??