本题和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
The Street View House Numbers (SVHN) Dataset SVHN is a real-world image dataset for developing machine learning and object recognition algorithms with ...
分类:
其他好文 时间:
2016-12-07 23:06:15
阅读次数:
487
2016年11月26日 星期六 --出埃及记 Exodus 20:17"You shall not covet your neighbor's house. You shall not covet your neighbor's wife, or his manservant or maidserv ...
分类:
其他好文 时间:
2016-12-03 14:35:03
阅读次数:
123
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
publicfunctionvillageinfo(){set_time_limit(‘0‘);$villageDb=D("Village");$houseDb=D("House");$areaDb=D("FangArea");$field="villageName,villageId,fangAreaId";$data=$villageDb->field($field)->select();foreach($dataas$key=>$val){$a=$areaDb->getAreaN..
分类:
Web程序 时间:
2016-11-29 00:07:19
阅读次数:
258
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
https://discuss.leetcode.com/topic/39834/step-by-step-tackling-of-the-problem rob(root) which will return the maximum amount of money that we can rob ...
分类:
其他好文 时间:
2016-11-23 12:41:31
阅读次数:
237