일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- Substring with Concatenation of All Words
- 30. Substring with Concatenation of All Words
- data science
- Generator
- 컴퓨터의 구조
- DWG
- 프로그래머스
- 315. Count of Smaller Numbers After Self
- kaggle
- Decorator
- Python Implementation
- LeetCode
- Python Code
- 109. Convert Sorted List to Binary Search Tree
- 밴픽
- Convert Sorted List to Binary Search Tree
- 715. Range Module
- attribute
- 파이썬
- 43. Multiply Strings
- Protocol
- 시바견
- concurrency
- Python
- 운영체제
- shiba
- t1
- Regular Expression
- Class
- iterator
Archives
- Today
- Total
목록188. Best Time to Buy and Sell Stock IV (1)
Scribbling
LeetCode: 188. Best Time to Buy and Sell Stock IV
LeetCode에서 푼 문제 중 가장 어려웠다... 당연히 빡대가리 내 머리로는 못 풀었고, 다른 사람 풀이 보고 이해하는 데에도 한참 걸렸다. DP로 풀어야하는데, 점화식은 아래와 같다. O(NK) Link: https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iv/discuss/655837/Python-Very-Detailed-Explanation-with-thought-process-DP 위 점화식에 대한 예제이다. P = [3, 3, 5, 0 0, 3, 1, 4], K = 3 class Solution: def maxProfit(self, k: int, prices: List[int]) -> int: if not prices: return..
Computer Science/Coding Test
2021. 11. 4. 18:11