今際の国の呵呵君
Monday, April 23, 2018
[LeetCode]Kill Process
很简单的题目,根据题目给出来的关系建树,这里我们用邻接表表示。然后BFS/DFS即可。时间复杂度O(K),K为应该被kill掉的process的数量。代码如下:
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment