Redundant Connection | Live Coding with Explanation | Leetcode - 684

Sdílet
Vložit
  • čas přidán 24. 06. 2021
  • Get Discount on GeeksforGeeks courses (practice.geeksforgeeks.org/co...) by using coupon code: ALGOMADEASY
    To support us you can donate
    UPI: algorithmsmadeeasy@icici
    Paypal: paypal.me/algorithmsmadeeasy
    Check out our other popular playlists:
    Questions you might like:
    ✅✅✅[ Tree Data Structure] : • Tree Data Structure
    ✅✅✅[ Graphs Data Structure] : • Graph Data Structure
    ✅✅✅[ February Leetcoding Challenge] : • February Leetcoding Ch...
    ✅✅✅[ January Leetcoding Challenge] : • January Leetcoding Cha...
    ✅✅✅[ February Leetcoding Challenge] : • February Leetcoding Ch...
    ✅✅✅[ March Leetcoding Challenge] : • March Leetcoding Chall...
    ✅✅✅[ December Leetcoding Challenge] : • December Leetcoding Ch...
    ✅✅✅[ November Leetcoding Challenge] : • November Leetcoding Ch...
    ✅✅✅[ August Leetcoding Challenge] : • August LeetCoding Chal...
    ✅✅✅[ July Leetcoding challenges] : • July LeetCoding Challe...
    ✅✅✅[ June Leetcoding challenges] : czcams.com/users/playlist?list...
    ✅✅✅[ May Leetcoding challenges] : • May LeetCoding Challen...
    ✅✅✅ Cracking the Coding Interview - Unique String: • Cracking the Coding In...
    Problem Link: leetcode.com/problems/redunda...
    Code: github.com/Algorithms-Made-Ea...
    If you find any difficulty or have any query then do COMMENT below. PLEASE help our channel by SUBSCRIBING and LIKE our video if you found it helpful.
    #coding #leetcode #programminglife #programmingisfun #programmer #tech #software #codinglife #leetcode

Komentáře • 31

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

    We hope you all are enjoying our videos!!! Don't forget to leave a comment!!! Please like the video to support us!!!
    Questions you might like:
    ✅✅✅[ Tree Data Structure] : czcams.com/play/PLJtzaiEpVo2zx-rCqLMmcFEpZw1UpGWls.html
    ✅✅✅[ Graphs Data Structure] : czcams.com/play/PLJtzaiEpVo2xg89cZzZCHqX03a1Vb6w7C.html
    ✅✅✅[ January 2021 Leetcoding Challenge] : czcams.com/play/PLJtzaiEpVo2wCalBcRcNjXQ0C6ku3dRkn.html
    ✅✅✅[ February 2021 Leetcoding Challenge] : czcams.com/play/PLJtzaiEpVo2wrfvII0eZQsPm-MZCmHodm.html
    ✅✅✅[ March 2021 Leetcoding Challenge] : czcams.com/play/PLJtzaiEpVo2zH-YC5ZiptbAvw2QZkmyk9.html
    ✅✅✅[ April 2021 Leetcoding Challenge] :czcams.com/play/PLJtzaiEpVo2z9PpcJcsl5j3RXutiTU-GB.html
    ✅✅✅[ December 2020 Leetcoding Challenge] : czcams.com/play/PLJtzaiEpVo2xo8OdPZxrpybGR8FmzZpCA.html
    ✅✅✅[ November 2020 Leetcoding Challenge] : czcams.com/play/PLJtzaiEpVo2yMYz5RPH6pfB0wNnwWsK7e.html
    ✅✅✅[ August 2020 Leetcoding Challenge] : czcams.com/play/PLJtzaiEpVo2xu4h0gYQzvOMboclK_pZMe.html
    ✅✅✅[ July 2020 Leetcoding challenges] : czcams.com/play/PLJtzaiEpVo2wrUwkvexbC-vbUqVIy7qC-.html
    ✅✅✅[ June 2020 Leetcoding challenges] : czcams.com/play/PLJtzaiEpVo2xIPptnCvUtKrUcod2zAKG.html
    ✅✅✅[ May 2020 Leetcoding challenges] : czcams.com/play/PLJtzaiEpVo2wRmUCq96zsUwOVD6p66K9e.html
    ✅✅✅ Cracking the Coding Interview - Unique String: czcams.com/play/PLJtzaiEpVo2xXf4LZb3y_BopOnLC1L4mE.html
    Struggling in a question??
    Leave in a comment and we will make a video!!!🙂🙂🙂

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

    This is the easiest explanation with good visualization support. I got the solution from Gemini and GPT, but they couldn't explain as well.
    The visualization assistance with examples was very apt, keep focusing on that.

  • @zn4798
    @zn4798 Před 3 lety

    Very clear and very good explanation!

  • @anshumansinghrajawat7242

    very neat , clean and easy explanation , keep the good work going

  • @aditgandhi5065
    @aditgandhi5065 Před 3 lety

    Very well explained. Good to have you back.......

  • @harinijeyaraman8789
    @harinijeyaraman8789 Před 2 lety

    Hi, your channel is really good, this video was really helpful, thanks a ton

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

    crystal clear explanation

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

    I guess what they meant by multiple answer is, you can return any of the vertex pair from a set, but return the last one

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

    Can this be done using Minimum Spanning Tree (Kruskal Algorithm), with each edge cost being the order of the input?

  • @kunalnegi18
    @kunalnegi18 Před 3 lety

    Really good explanation.

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

    Perfectly explained. Simple and clean solution. Thanks.

  • @ASHISHSINGH-gs3yt
    @ASHISHSINGH-gs3yt Před 2 lety +1

    What an amazing explaination, i looked for this problem through the youtube. FINAllyyyyyy thanks

    • @AlgorithmsMadeEasy
      @AlgorithmsMadeEasy  Před 2 lety

      Thanks Ashish!!!
      Do checkout our other videos and share with your friends too. 😊

  • @harshyadav5162
    @harshyadav5162 Před 2 lety

    great!!

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

    very nice and clear explanation...thank you and please keep doing this..it is very helpful.

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

    Thanks

  • @ayushroy2552
    @ayushroy2552 Před 3 lety

    If you were to use path compression for find(), you'd reduce time complexity to O(logn).

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

    Thanks for explaining it like I am 5 year old :D ! Keep up the good work !

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

    Welcome back :)

  • @PriyankaSingh-pn8xv
    @PriyankaSingh-pn8xv Před 3 lety +1

    Clearly explained

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

    Awesome Explanation, Thanks
    CPP Code:
    class Solution {
    public:
    vector parent;
    int find(int node){
    while(parent[node] != node)
    node = parent[node];
    return node;
    }
    void union1(int i, int j){
    int iRoot = find(i);
    int jRoot = find(j);
    if(iRoot != jRoot){
    parent[jRoot] = iRoot;
    }
    }
    vector findRedundantConnection(vector& edges) {
    int n = edges.size();
    // Make each node the parent of itself
    for(int i=0;i

  • @athravmehta4598
    @athravmehta4598 Před rokem

    Is this code, not working now. It's showing wrong answer when submitting

  • @samirpaul2
    @samirpaul2 Před 2 lety

    🙌👍

  • @thefails2635
    @thefails2635 Před 2 lety

    Am I the only one who was falling for her voice !!

    • @exploringnaturalbeauty2102
      @exploringnaturalbeauty2102 Před 2 lety

      bhai padai pe dhyaan do tharki saalo . nautanki karwa lo bas " am i falling for .. bla bla shit .."

  • @abhinavsingh9720
    @abhinavsingh9720 Před 2 lety

    Thanks