Skip to content

Commit 8253553

Browse files
committed
213-house-robber-ii.md Simplified Python solution.
1 parent ff743e2 commit 8253553

File tree

3 files changed

+27
-3
lines changed

3 files changed

+27
-3
lines changed

en/1-1000/213-house-robber-ii.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class Solution:
5252

5353
return max(
5454
max_money_robbed(nums[1:]),
55-
max_money_robbed(nums[:len(nums) - 1])
55+
max_money_robbed(nums[:-1])
5656
)
5757

5858
def max_money_robbed(nums):

en/3001-4000/unorganized.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,29 @@ The improved way with a queue is commonly more efficient. Relaxing **All Edges**
133133
- 376 https://leetcode.cn/problems/wiggle-subsequence/
134134
- 53 https://leetcode.cn/problems/maximum-subarray/
135135
- 122 https://leetcode.cn/problems/best-time-to-buy-and-sell-stock-ii/
136+
- 55 https://leetcode.cn/problems/jump-game/
137+
- 45 https://leetcode.cn/problems/jump-game-ii/
138+
- 1005 https://leetcode.cn/problems/maximize-sum-of-array-after-k-negations/
139+
- 135 https://leetcode.cn/problems/candy/
140+
- 860 https://leetcode.cn/problems/lemonade-change/
141+
- 406 https://leetcode.cn/problems/queue-reconstruction-by-height/
142+
- 452 https://leetcode.cn/problems/minimum-number-of-arrows-to-burst-balloons
143+
- 435 https://leetcode.cn/problems/non-overlapping-intervals/
144+
- 763 https://leetcode.cn/problems/partition-labels/
145+
- 56 https://leetcode.cn/problems/merge-intervals/
146+
- 738 https://leetcode.cn/problems/monotone-increasing-digits/
147+
- 968 https://leetcode.cn/problems/binary-tree-cameras/
148+
149+
### Dynamic programming
150+
- 70 https://leetcode.cn/problems/climbing-stairs/
151+
- 746 https://leetcode.cn/problems/min-cost-climbing-stairs/
152+
- 62 https://leetcode.cn/problems/unique-paths/
153+
- 63 https://leetcode.cn/problems/unique-paths-ii/
154+
- 343 https://leetcode.cn/problems/integer-break/
155+
156+
#### backpack problems
157+
- 279 https://leetcode.cn/problems/perfect-squares/ can have solution 2
158+
-
136159

137160
### Failed in 2 rounds
138161
- 222 https://leetcode.cn/problems/count-complete-tree-nodes/
@@ -142,5 +165,6 @@ The improved way with a queue is commonly more efficient. Relaxing **All Edges**
142165
- 332 https://leetcode.cn/problems/reconstruct-itinerary/
143166
- 51 https://leetcode.cn/problems/n-queens/
144167
- 37 https://leetcode.cn/problems/sudoku-solver
168+
- 96 https://leetcode.cn/problems/unique-binary-search-trees/ Finished but slow.
145169

146-
2005-02-04 day 7
170+
2005-02-07 day 4

zh/1-1000/213-house-robber-ii.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class Solution:
5252

5353
return max(
5454
max_money_robbed(nums[1:]),
55-
max_money_robbed(nums[:len(nums) - 1])
55+
max_money_robbed(nums[:-1])
5656
)
5757

5858
def max_money_robbed(nums):

0 commit comments

Comments
 (0)