LeetCode 1791. Find Center of Star Graph
Input: edges = [[1,2],[2,3],[4,2]]
Output: 2
Explanation: As shown in the figure above, node 2 is connected to every other node, so 2 is the center.Input: edges = [[1,2],[5,1],[1,3],[1,4]]
Output: 1Solution
PreviousLeetCode 1790. Check if One String Swap Can Make Strings EqualNextLeetCode 1792. Maximum Average Pass Ratio
Last updated
