Given a graph that started as a tree with n nodes (1 to n) plus one additional edge, find the edge that can be removed so that the resulting graph is a tree of n nodes.
Input: edges = [[1,2],[1,3],[2,3]]
Output: [2,3]
Topics: graphs
Asked by: Amazon, Google, Meta
Time complexity: O(n α(n)). Space complexity: O(n).