LeetCide 动态规划
文章平均质量分 66
大疯疯
这个作者很懒,什么都没留下…
展开
-
LeetCode 120. Triangle 动态规划
120. Triangle Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below. For example, given the following triangle [原创 2017-06-15 23:03:49 · 930 阅读 · 0 评论 -
LeetCode 64. Minimum Path Sum 动态规划
64. Minimum Path Sum Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path. Note: You can only move原创 2017-06-16 16:03:58 · 493 阅读 · 0 评论 -
LeetCode 343. Integer Break 动态规划,状态转移方程
343. Integer Break Given a positive integer n, break it into the sum of at least two positive integers and maximize the product of those integers. Return the maximum product you can get. For exa原创 2017-06-19 15:51:36 · 520 阅读 · 0 评论 -
LeetCode 198. House Robber 递归->记忆->动态规划 ->新思路
198. House Robber You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you from robbing each of them is原创 2017-06-20 21:21:55 · 664 阅读 · 0 评论 -
LeetCode 213. House Robber II 注意考察环尾和环头交叉处
213. House Robber II After robbing those houses on that street, the thief has found himself a new place for his thievery so that he will not get too much attention. This time, all houses at this plac原创 2017-06-20 21:38:21 · 326 阅读 · 0 评论 -
LeetCode 70. Climbing Stairs 自顶向下记忆化搜索,自底向上重叠子问题动态规划
70. Climbing Stairs You are climbing a stair case. It takes n steps to reach to the top. Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top? Not原创 2017-06-15 19:31:30 · 594 阅读 · 0 评论 -
LeetCode 523. Continuous Subarray sum和 525. Contiguous Array和560. Subarray Sum Equals K
523. Continuous Subarray Sum Given a list of non-negative numbers and a target integer k, write a function to check if the array has a continuous subarray of size at least 2 that sums up to the multi原创 2017-09-03 21:58:06 · 570 阅读 · 0 评论