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