-
[Leetcode] 198. House Robber(In Python)[Python] 파이썬/Leetcode_Medium 2021. 12. 2. 00:03
숫자 하나를 더하면 옆의 숫자는 더하지 말고 최댓값을 구하라는 문제.
An을 n개까지 최대값이라고하면 An = An-2 + a(n) 이거나 An = An-1이 된다. 점화식같네.
디스커스는 항상 대단해...
'[Python] 파이썬 > Leetcode_Medium' 카테고리의 다른 글
[Leetcode] 394. Decode String (In Python) (0) 2021.12.20 [Leetcode] 24. Swap Nodes in Pairs (In Python) (0) 2021.01.17 [Leetcode] 19. Remove Nth Node From End of List (In Python) (0) 2021.01.14 [Leetcode] 18. 4Sum (In Python) (0) 2021.01.13 [Leetcode] 17. Letter Combinations of a Phone Number (In Python) (0) 2021.01.12