摘要:
题目链接 "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
阅读(135)
评论(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
阅读(124)
评论(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
阅读(210)
评论(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
阅读(225)
评论(0)
推荐(0)

浙公网安备 33010602011771号