挨个偷屋里的钱,相邻的房屋不能被偷,问最大偷得的钱是多少,采用动态规划,publicclassSolution{publicintrob(int[]nums){intl=nums.length;if(l==0)return0;int[][]record=newint[2][l];for(inti=0;i<l;i++){record[0][i]=0;record[1][i]=0;}inttou=0;intnulltou=0;for(i..
分类:
其他好文 时间:
2015-04-28 18:59:22
阅读次数:
110
https://leetcode.com/problems/house-robber/You are a professional robber planning to rob houses along a street. Each house has a certain amount of mon...
分类:
其他好文 时间:
2015-04-27 00:02:21
阅读次数:
217
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 constra...
分类:
其他好文 时间:
2015-04-26 22:36:06
阅读次数:
138
House RobberYou are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint...
分类:
其他好文 时间:
2015-04-26 17:59:58
阅读次数:
103
题目描述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 that adjacent ho...
分类:
编程语言 时间:
2015-04-22 18:27:15
阅读次数:
121
题目:House RobberYou are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constra...
分类:
其他好文 时间:
2015-04-22 17:44:42
阅读次数:
112
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 that adjacent house...
分类:
其他好文 时间:
2015-04-21 16:17:04
阅读次数:
122
这题告诉我们,要成为一个优秀的小偷,得懂编程才行。哈哈
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...
分类:
其他好文 时间:
2015-04-21 00:28:04
阅读次数:
154
题目:
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 that adjacent h...
分类:
其他好文 时间:
2015-04-20 18:28:00
阅读次数:
127
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 that adjacent house...
分类:
其他好文 时间:
2015-04-20 13:13:33
阅读次数:
122