일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- Python Code
- 밴픽
- 시바견
- 파이썬
- DWG
- t1
- kaggle
- concurrency
- 315. Count of Smaller Numbers After Self
- Class
- 컴퓨터의 구조
- Substring with Concatenation of All Words
- 프로그래머스
- iterator
- Regular Expression
- Convert Sorted List to Binary Search Tree
- Decorator
- Python
- Python Implementation
- 715. Range Module
- 운영체제
- Protocol
- Generator
- 109. Convert Sorted List to Binary Search Tree
- LeetCode
- attribute
- shiba
- 30. Substring with Concatenation of All Words
- data science
- 43. Multiply Strings
Archives
- Today
- Total
목록322. 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