题目: You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stoppin ...
分类:
编程语言 时间:
2017-02-18 18:45:00
阅读次数:
162
Note: This is an extension of House Robber. After robbing those houses on that street, the thief has found himself a new place for his thievery so tha ...
分类:
其他好文 时间:
2017-01-30 10:34:57
阅读次数:
198
The thief has found himself a new place for his thievery again. There is only one entrance to this area, called the "root." Besides the root, each hou ...
分类:
其他好文 时间:
2016-12-25 23:44:20
阅读次数:
211
// Ref: https://segmentfault.com/a/1190000003811581// Ref: http://www.cnblogs.com/grandyang/p/4383632.html /*如果选择了抢劫上一个屋子,那么就不能抢劫当前的屋子,所以最大收益就是抢劫上一个屋子 ...
分类:
其他好文 时间:
2016-12-22 06:56:28
阅读次数:
184
本题和House Robber差不多,分成两种情况来解决。第一家是不是偷了,如果偷了,那么最后一家肯定不能偷。 1 class Solution(object): 2 def rob(self, nums): 3 """ 4 :type nums: List[int] 5 :rtype: int 6 ...
分类:
其他好文 时间:
2016-12-16 07:55:43
阅读次数:
252
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 yo ...
分类:
其他好文 时间:
2016-12-15 07:35:21
阅读次数:
255
Note: This is an extension of House Robber. After robbing those houses on that street, the thief has found himself a new place for his thievery so tha ...
分类:
其他好文 时间:
2016-11-30 01:57:10
阅读次数:
191
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 yo ...
分类:
其他好文 时间:
2016-11-29 22:49:35
阅读次数:
202
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 yo ...
分类:
其他好文 时间:
2016-11-28 09:26:28
阅读次数:
185
Note: This is an extension of House Robber. After robbing those houses on that street, the thief has found himself a new place for his thievery so tha ...
分类:
其他好文 时间:
2016-11-28 09:09:02
阅读次数:
148