Open ishu9bansal opened 4 years ago
motivated by votrubac's code here: https://leetcode.com/problems/shortest-bridge/discuss/189293/C%2B%2B-BFS-Island-Expansion-%2B-UF-Bonus
make changes to convert it to recursive approach instead https://github.com/ishu9bansal/ideone/tree/master/union_graph
https://leetcode.com/submissions/detail/388808430/?from=/explore/featured/card/august-leetcoding-challenge/553/week-5-august-29th-august-31st/3442/