find : O(N) would be using disjoint set or union find problem link : https://leetcode.com/problems/redundant-connection/ O(N^2) solution : https://github.com/NITIN23329/LeetCode/blob/1310538efabe059122e43062921e6ebb0b73ab01/Trees/RedundantConnections.java#L1
find : O(N) would be using disjoint set or union find
problem link : https://leetcode.com/problems/redundant-connection/
O(N^2) solution :
LeetCode/Trees/RedundantConnections.java
Line 1 in 1310538