上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 31 下一页
摘要: 题目: 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 ha 阅读全文
posted @ 2017-05-14 01:07 panini 阅读(221) 评论(0) 推荐(0) 编辑
摘要: DescriptionGiven 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 阅读全文
posted @ 2017-05-13 23:24 panini 阅读(993) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island is surrounded by water and is formed by connecting adj 阅读全文
posted @ 2017-05-13 22:52 panini 阅读(242) 评论(0) 推荐(0) 编辑
摘要: DescriptionConvert a binary search tree to doubly linked list with in-order traversal.ExampleGiven a binary search tree: 4 / \ 2 5 / \1 3return 1<->2< 阅读全文
posted @ 2017-05-12 09:16 panini 阅读(1033) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a binary search tree and a node in it, find the in-order successor of that node in the BST. Note: If the given node has no in-order successo 阅读全文
posted @ 2017-05-12 08:02 panini 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a binary tree, find the maximum path sum. For this problem, a path is defined as any sequence of nodes from some starting node to any node i 阅读全文
posted @ 2017-05-11 11:35 panini 阅读(115) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a binary tree, return the postorder traversal of its nodes' values. For example:Given binary tree {1,#,2,3}, return [3,2,1]. Note: Recursive 阅读全文
posted @ 2017-05-11 06:12 panini 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 题目 Given a binary tree, return the inorder traversal of its nodes' values. For example:Given binary tree [1,null,2,3], return [1,3,2]. Note: Recursive 阅读全文
posted @ 2017-05-11 05:43 panini 阅读(370) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a binary tree, return the preorder traversal of its nodes' values. For example:Given binary tree {1,#,2,3}, 1 \ 2 / 3 return [1,2,3]. Note:  阅读全文
posted @ 2017-05-11 05:25 panini 阅读(125) 评论(0) 推荐(0) 编辑
摘要: DescriptionIt's follow up problem for Binary Tree Longest Consecutive Sequence IIGiven a k-ary tree, find the length of the longest consecutive sequen 阅读全文
posted @ 2017-05-11 03:22 panini 阅读(672) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 31 下一页