码迷,mamicode.com
首页 >  
搜索关键字:robber    ( 302个结果
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 yo ...
分类:其他好文   时间:2016-04-17 10:19:50    阅读次数:135
LeetCode 337. House Robber III
一开始以为不直接连接的话就考虑隔层加钱,偶数层和奇数层分开算得两个结果,但是输入为[4,1,null,2,null,null,3]时最大值为4+3 = 7,4是第0层,3是3层。 因此要以节点为对象,而不是层。每个节点的情况分两种,抢和不抢,如果抢当前节点,那么左右节点不能抢;如果不抢,那么当前节点 ...
分类:其他好文   时间:2016-04-12 21:01:32    阅读次数:339
HDU-2955Robberies
Robberies Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Description The aspiring Roy the Robber has seen a lot of A ...
分类:其他好文   时间:2016-04-06 02:07:03    阅读次数:237
LeetCode 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 yo ...
分类:其他好文   时间:2016-04-05 07:06:00    阅读次数:146
【LeetCode】House Robber III(337)
1. Description 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 ...
分类:其他好文   时间:2016-04-03 15:59:26    阅读次数:175
LeetCode House Robber III
原题链接在这里:https://leetcode.com/problems/house-robber-iii/ 题目: The thief has found himself a new place for his thievery again. There is only one entrance ...
分类:其他好文   时间:2016-03-27 07:13:28    阅读次数:133
337_House Robber III
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-03-20 17:57:45    阅读次数:142
[LeetCode]House Robber II
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-03-18 17:28:26    阅读次数:203
<LeetCode OJ> 337. House Robber III
Total Accepted: 1341 Total Submissions: 3744 Difficulty: Medium The thief has found himself a new place for his thievery again. There is only one entrance to this area, called the "root." B...
分类:其他好文   时间:2016-03-15 14:58:48    阅读次数:349
leetcode笔记:House Robber III
题目的意思是,小偷找到了一个新的偷盗场所。这片区域只有一个入口,叫做“根”。除了根以外,每个屋子有且仅有一个父屋子。在踩点之后盗贼发现,所有的房间构造形成了一棵二叉树。如果两个直接相连的屋子在同时被盗窃,就会惊动警察。...
分类:其他好文   时间:2016-03-15 14:56:09    阅读次数:305
302条   上一页 1 ... 14 15 16 17 18 ... 31 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!