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