Redundant Connection | Live Coding with Explanation | Leetcode - 684
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
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!!!🙂🙂🙂
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.
Thank you very much!!
Very clear and very good explanation!
very neat , clean and easy explanation , keep the good work going
Very well explained. Good to have you back.......
Hi, your channel is really good, this video was really helpful, thanks a ton
crystal clear explanation
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
Can this be done using Minimum Spanning Tree (Kruskal Algorithm), with each edge cost being the order of the input?
Really good explanation.
Perfectly explained. Simple and clean solution. Thanks.
Happy ro help !!
What an amazing explaination, i looked for this problem through the youtube. FINAllyyyyyy thanks
Thanks Ashish!!!
Do checkout our other videos and share with your friends too. 😊
great!!
very nice and clear explanation...thank you and please keep doing this..it is very helpful.
Thanks for you comment !!
Surely !! Happy to help !!
Thanks
If you were to use path compression for find(), you'd reduce time complexity to O(logn).
Thanks for explaining it like I am 5 year old :D ! Keep up the good work !
Yes this awesome
Welcome back :)
Clearly explained
Thanks !!
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
Is this code, not working now. It's showing wrong answer when submitting
🙌👍
Am I the only one who was falling for her voice !!
bhai padai pe dhyaan do tharki saalo . nautanki karwa lo bas " am i falling for .. bla bla shit .."
Thanks