【LeetCode】Python实现-198. 打家劫舍

解答: class Solution(object): def rob(self, nums): """ :type nums: List[int] :rtype: int """ last = 0 now = 0 for i in nums: last, now = now, max(last +
相关文章
相关标签/搜索