03 2016 档案

摘要:题目链接 "https://leetcode.com/problems/triangle/" 题目原文 Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent 阅读全文
posted @ 2016-03-25 11:37 slurm 阅读(136) 评论(0) 推荐(0)
摘要:题目链接 "https://leetcode.com/problems/pascals triangle ii/" 题目原文 Given an index k, return the kth row of the Pascal's triangle. For example, given k = 3 阅读全文
posted @ 2016-03-25 11:32 slurm 阅读(128) 评论(0) 推荐(0)
摘要:题目链接 "https://leetcode.com/problems/pascals triangle/" 题目原文 Given numRows, generate the first numRows of Pascal's triangle. For example, given numRows 阅读全文
posted @ 2016-03-25 11:29 slurm 阅读(213) 评论(0) 推荐(0)
摘要:题目链接 "https://leetcode.com/problems/populating next right pointers in each node ii/" 题目原文 题目大意 和上一题类似,但是可能会有些节点没有左子树或者右子树 解题思路 使用层次遍历: 1. 临时节点指向根节点的左子 阅读全文
posted @ 2016-03-25 11:25 slurm 阅读(405) 评论(0) 推荐(0)
摘要:题目链接 "https://leetcode.com/problems/populating next right pointers in each node/" 题目原文 题目大意 二叉树的每个节点都包含左子树和右子树,将同一层的子树用链表连接起来 解题思路 递归求解: 1.如果该节点有左子树:1 阅读全文
posted @ 2016-03-25 11:15 slurm 阅读(228) 评论(0) 推荐(0)
摘要:题目链接 "https://leetcode.com/problems/distinct subsequences/" 题目原文 Given a string S and a string T, count the number of distinct subsequences of T in S. 阅读全文
posted @ 2016-03-17 16:27 slurm 阅读(205) 评论(0) 推荐(0)
摘要:题目链接 "https://leetcode.com/problems/flatten binary tree to linked list/" 题目原文 Given a binary tree, flatten it to a linked list in place. For example, 阅读全文
posted @ 2016-03-17 16:24 slurm 阅读(281) 评论(0) 推荐(0)
摘要:题目链接 "https://leetcode.com/problems/path sum ii/" 题目原文 Given a binary tree and a sum, find all root to leaf paths where each path's sum equals the giv 阅读全文
posted @ 2016-03-13 17:02 slurm 阅读(411) 评论(0) 推荐(0)
摘要:题目链接 "https://leetcode.com/problems/path sum/" 题目原文 Given a binary tree and a sum, determine if the tree has a root to leaf path such that adding up a 阅读全文
posted @ 2016-03-13 16:57 slurm 阅读(179) 评论(0) 推荐(0)
摘要:题目链接 "https://leetcode.com/problems/minimum depth of binary tree/" 题目原文 Given a binary tree, find its minimum depth. The minimum depth is the number o 阅读全文
posted @ 2016-03-13 16:53 slurm 阅读(163) 评论(0) 推荐(0)
摘要:题目链接 "https://leetcode.com/problems/balanced binary tree/" 题目原文 Given a binary tree, determine if it is height balanced. For this problem, a height ba 阅读全文
posted @ 2016-03-10 17:19 slurm 阅读(343) 评论(0) 推荐(0)
摘要:题目链接 "https://leetcode.com/problems/convert sorted list to binary search tree/" 题目原文 Given a singly linked list where elements are sorted in ascending 阅读全文
posted @ 2016-03-10 17:17 slurm 阅读(218) 评论(0) 推荐(0)
摘要:题目链接 "https://leetcode.com/problems/convert sorted array to binary search tree/" 题目原文 Given an array where elements are sorted in ascending order, con 阅读全文
posted @ 2016-03-10 17:15 slurm 阅读(325) 评论(0) 推荐(0)
摘要:题目链接 "https://leetcode.com/problems/binary tree level order traversal ii/" 题目原文 Given a binary tree, return the bottom up level order traversal of its 阅读全文
posted @ 2016-03-10 17:12 slurm 阅读(219) 评论(0) 推荐(0)
摘要:题目链接 "https://leetcode.com/problems/construct binary tree from inorder and postorder traversal/" 题目原文 Given inorder and postorder traversal of a tree, 阅读全文
posted @ 2016-03-10 17:08 slurm 阅读(309) 评论(0) 推荐(0)
摘要:题目链接 "https://leetcode.com/problems/construct binary tree from preorder and inorder traversal/" 题目原文 Given preorder and inorder traversal of a tree, c 阅读全文
posted @ 2016-03-03 20:53 slurm 阅读(525) 评论(0) 推荐(0)
摘要:题目链接 "https://leetcode.com/problems/maximum depth of binary tree/" 题目原文 Given a binary tree, find its maximum depth. The maximum depth is the number o 阅读全文
posted @ 2016-03-03 20:48 slurm 阅读(198) 评论(0) 推荐(0)
摘要:题目链接 "https://leetcode.com/problems/binary tree zigzag level order traversal/" 题目原文 Given a binary tree, return the zigzag level order traversal of it 阅读全文
posted @ 2016-03-03 20:46 slurm 阅读(382) 评论(0) 推荐(0)
摘要:题目链接 "https://leetcode.com/problems/binary tree level order traversal/" 题目原文 Given a binary tree, return the level order traversal of its nodes' value 阅读全文
posted @ 2016-03-03 20:41 slurm 阅读(160) 评论(0) 推荐(0)
摘要:题目链接 "https://leetcode.com/problems/symmetric tree/" 题目原文 Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center 阅读全文
posted @ 2016-03-03 20:34 slurm 阅读(148) 评论(0) 推荐(0)