일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 | 31 |
Tags
- iterator
- 컴퓨터의 구조
- t1
- 프로그래머스
- 30. Substring with Concatenation of All Words
- Regular Expression
- Python Implementation
- kaggle
- concurrency
- Substring with Concatenation of All Words
- 운영체제
- Decorator
- shiba
- data science
- Class
- Protocol
- Generator
- Convert Sorted List to Binary Search Tree
- Python Code
- attribute
- Python
- 109. Convert Sorted List to Binary Search Tree
- 43. Multiply Strings
- 시바견
- LeetCode
- 파이썬
- 밴픽
- 715. Range Module
- 315. Count of Smaller Numbers After Self
- DWG
Archives
- Today
- Total
목록Coin Change (1)
Scribbling
LeetCode: 322. Coin Change
This is a typical DP problem. At first, one should think of backtracking all the cases. That way, you can find the solution but it isn't efficient. In the meantime, you should notice that you will calculate for the same amount repeatedly when backtracking all the cases. Inspired by that idea, apply DP there. Below is the code. INF = int(1e9) class Solution: def coinChange(self, coins: List[int],..
Computer Science/Coding Test
2022. 1. 7. 11:33