leetcode 198(dp), 213(dp), 337(dp) 198 https://leetcode.com/problems/house-robber/ n>=3일때 n의 최대값은 max(n-2번째집까지의 최대값 or n-3번째집까지의 최대값) + 현재집이다. 이렇게 만들고 풀어준다. class Solution(object): def rob(self, nums): if not nums: return 0 elif len(nums) algorithm/problem solving 2020.04.19