标签:process 长度 microsoft sel cti ppi 进程 bsp lis
/ \
1 5
/
10
class Solution(object): def killProcess(self, pid, ppid, kill): """ :type pid: List[int] :type ppid: List[int] :type kill: int :rtype: List[int] """ d = collections.defaultdict(list); for c, p in zip(pid, ppid): d[p].append(c) bfs = [kill] for i in bfs: bfs.extend(d.get(i,[])) return bfs
标签:process 长度 microsoft sel cti ppi 进程 bsp lis
原文地址:http://www.cnblogs.com/team42/p/6921896.html