
310. Minimum Height Trees
·
Algorithm
Minimum Height Trees - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 1. Brute Force DFS (시간 초과) from typing import * from collections import defaultdict class Solution: def findMinHeightTrees(self, n: int, edges: List[List[int]]) -> List[int]: graph = defaultdict(set) for edge in..