动态规划
0_o_c
这个作者很懒,什么都没留下…
展开
-
312. Burst Balloons
1、留坑吧。。。看不懂别人的代码原创 2016-09-16 03:25:15 · 453 阅读 · 0 评论 -
[动态规划]hdu 1003 Max Sum 最大子列
Online Judge Online Exercise Online Teaching Online Contests Exercise Author F.A.Q Hand In Hand Online Acmers Forum | Discuss Statistical Charts Problem Archive Realtime Judge Status Authors原创 2017-04-26 23:54:23 · 672 阅读 · 0 评论 -
unique-paths
1、链接:这里写链接内容 A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below).The robot can only move either down or right at any point in time. The robot is trying to r原创 2017-10-20 02:25:30 · 209 阅读 · 0 评论 -
minimum-path-sum
1、来源:minimum-path-sumGiven 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 eithe原创 2017-10-28 02:28:25 · 215 阅读 · 0 评论 -
unique-paths-ii
1、来源:unique-paths-iiFollow up for “Unique Paths”: Now consider if some obstacles are added to the grids. How many unique paths would there be? An obstacle and empty space is marked as1and0respectivel原创 2017-10-28 03:12:00 · 273 阅读 · 0 评论 -
word-break
1、word-break Given a string s and a dictionary of words dict, determine if s can be segmented into a space-separated sequence of one or more dictionary words. For example, given s =”leetcode”, dict原创 2017-10-29 01:58:57 · 236 阅读 · 0 评论 -
climbing-stairs
1、来源: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?2、思路:直接原创 2017-10-24 00:43:03 · 320 阅读 · 0 评论 -
二叉树的深度
1、题目描述(来自牛客,leetcode也有一样的题目Leetcode-104. Maximum Depth of Binary Tree): 输入一棵二叉树,求该树的深度。从根结点到叶结点依次经过的结点(含根、叶结点)形成树的一条路径,最长路径的长度为树的深度。2、思路:动态规划的思想:记子树i的层数为f(i),i 的左右子树分别为left、right则 f(i) = 1+max{f(left原创 2017-09-21 16:31:05 · 244 阅读 · 0 评论 -
最大连续子序列和-动态规划
1、题目描述(来自牛客): HZ偶尔会拿些专业问题来忽悠那些非计算机专业的同学。今天测试组开完会后,他又发话了:在古老的一维模式识别中,常常需要计算连续子向量的最大和,当向量全为正数的时候,问题很好解决。但是,如果向量中包含负数,是否应该包含某个负数,并期望旁边的正数会弥补它呢?例如:{6,-3,-2,7,-15,1,2,2},连续子向量的最大和为8(从第0个开始,到第3个为止)。你会不会被他忽悠原创 2017-09-21 15:27:27 · 292 阅读 · 0 评论