上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 29 下一页
摘要: Check whether the original sequence org can be uniquely reconstructed from the sequences in seqs. The org sequence is a permutation of the integers fr 阅读全文
posted @ 2017-10-27 04:49 jasminemzy 阅读(242) 评论(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-10-26 05:46 jasminemzy 阅读(192) 评论(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 t 阅读全文
posted @ 2017-10-26 05:11 jasminemzy 阅读(131) 评论(0) 推荐(0) 编辑
摘要: Given an directed graph, a topological order of the graph nodes is defined as follow: For each directed edge A -> B in graph, A must before B in the o 阅读全文
posted @ 2017-10-25 13:10 jasminemzy 阅读(144) 评论(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-10-25 05:04 jasminemzy 阅读(136) 评论(0) 推荐(0) 编辑
摘要: 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 labele 阅读全文
posted @ 2017-10-25 03:26 jasminemzy 阅读(203) 评论(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-10-24 14:28 jasminemzy 阅读(148) 评论(0) 推荐(0) 编辑
摘要: Design an algorithm and write code to serialize and deserialize a binary tree. Writing the tree to a file is called 'serialization' and reading back f 阅读全文
posted @ 2017-10-24 12:10 jasminemzy 阅读(176) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, return the zigzag level order traversal of its nodes' values. (ie, from left to right, then right to left for the next level and 阅读全文
posted @ 2017-10-23 02:24 jasminemzy 阅读(247) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, design an algorithm which creates a linked list of all the nodes at each depth (e.g., if you have a tree with depth D, you'll hav 阅读全文
posted @ 2017-10-22 14:15 jasminemzy 阅读(311) 评论(0) 推荐(0) 编辑
上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 29 下一页