Skip to content

Create 213. House Robber II.md#36

Open
tokuhirat wants to merge 1 commit intomainfrom
213.-House-Robber-II
Open

Create 213. House Robber II.md#36
tokuhirat wants to merge 1 commit intomainfrom
213.-House-Robber-II

Conversation

@tokuhirat
Copy link
Owner

This Problem
213. House Robber II
Next Ploblem
121. Best Time to Buy and Sell Stock
言語: Python

max_gain_skipped = max(max_gain_skipped, prev_max_gain_robbed)
return max(max_gain_skipped, max_gain_robbed)

return max(rob_linearly(nums[:-1]), rob_linearly(nums[1:]))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

自分もこの実装が、わかりやすくて良いかと思いました。
特に問題ないと思います。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants