📈
notes
More
Search
Ctrl + K
思路1 dp
dp[i]表示到i为止,能打劫的最大数。
dp[i] = max(dp[i-2] + nums[i], dp[i-1]);
Previous
0198_House_Robber
Next
0199_Binary_Tree_Right_Side_View
Last updated
2 years ago