上一页 1 ··· 17 18 19 20 21 22 23 24 25 ··· 38 下一页
摘要: Given n nodes in a graph labeled from 1 to n. There is no edges in the graph at beginning. You need to support the following method:1. connect(a, b), 阅读全文
posted @ 2017-11-12 02:23 Review->Improve 阅读(244) 评论(0) 推荐(0)
摘要: Given n nodes in a graph labeled from 1 to n. There is no edges in the graph at beginning. You need to support the following method: 1. connect(a, b), 阅读全文
posted @ 2017-11-12 02:14 Review->Improve 阅读(603) 评论(0) 推荐(0)
摘要: Find the number Weak Connected Component in the directed graph. Each node in the graph contains a label and a list of its neighbors. (a weak connected 阅读全文
posted @ 2017-11-12 01:50 Review->Improve 阅读(620) 评论(0) 推荐(0)
摘要: Find the number connected component in the undirected graph. Each node in the graph contains a label and a list of its neighbors. (a connected compone 阅读全文
posted @ 2017-11-11 12:24 Review->Improve 阅读(1719) 评论(0) 推荐(0)
摘要: Six degrees of separation is the theory that everyone and everything is six or fewer steps away, by way of introduction, from any other person in the 阅读全文
posted @ 2017-11-11 09:53 Review->Improve 阅读(545) 评论(0) 推荐(0)
摘要: Deep clone an undirected graph. Each node in the graph contains a label and a list of its neighbors. How we serialize an undirected graph: Nodes are l 阅读全文
posted @ 2017-11-11 09:32 Review->Improve 阅读(419) 评论(0) 推荐(0)
摘要: Given n nodes labeled from 0 to n - 1 and a list of undirected edges (each edge is a pair of nodes), write a function to check whether these edges mak 阅读全文
posted @ 2017-11-10 13:06 Review->Improve 阅读(540) 评论(0) 推荐(0)
摘要: Given a undirected graph, a node and a target, return the nearest node to given node which value of it is target, return NULL if you can't find. There 阅读全文
posted @ 2017-11-10 11:14 Review->Improve 阅读(846) 评论(0) 推荐(0)
摘要: Given an integer array, heapify it into a min-heap array. For a heap array A, A[0] is the root of heap, and for each A[i], A[i * 2 + 1] is the left ch 阅读全文
posted @ 2017-11-08 14:43 Review->Improve 阅读(395) 评论(0) 推荐(0)
摘要: There are a total of n courses you have to take, labeled from 0 to n - 1.Some courses may have prerequisites, for example to take course 0 you have to 阅读全文
posted @ 2017-11-08 02:09 Review->Improve 阅读(434) 评论(0) 推荐(0)
上一页 1 ··· 17 18 19 20 21 22 23 24 25 ··· 38 下一页