def findMinHeightTrees_TLE(self, n, edges):
        if not edges:
            return 0

        V = {i: [] for i in xrange(n)}
        for a, b in edges:
            V[a].append(b)
            V[b].append(a)

        ret = []
        mini = n
        for k in V.keys():
            l = self.bfs(k, V)
            if l < mini:
                ret = [k]
                mini = l
            elif l == mini:
                ret.append(k)

        return ret
:type n: int
dataset/ETHPy150Open algorhythms/LeetCode/310 Minimum Height Trees.py/Solution_TLE.findMinHeightTrees_TLE