1791. Find Center of Star Graph

Обновлено: 2024-03-12
1 мин
[]

Содержание

LeetCode problem 1791

class Solution:
    def findCenter(self, edges: List[List[int]]) -> int:
        return edges[0][0] if edges[0][0] in edges[1] else edges[0][1]