일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- LeetCode
- Generator
- Python Implementation
- 운영체제
- 컴퓨터의 구조
- DWG
- 30. Substring with Concatenation of All Words
- Protocol
- data science
- Class
- 315. Count of Smaller Numbers After Self
- 밴픽
- 파이썬
- iterator
- 43. Multiply Strings
- 109. Convert Sorted List to Binary Search Tree
- Substring with Concatenation of All Words
- Python Code
- Python
- 프로그래머스
- Regular Expression
- concurrency
- shiba
- t1
- Convert Sorted List to Binary Search Tree
- 시바견
- kaggle
- Decorator
- attribute
- 715. Range Module
Archives
- Today
- Total
목록123. Best Time to Buy and Sell Stock III (1)
Scribbling
LeetCode: 123. Best Time to Buy and Sell Stock III
class Solution(object): def maxProfit(self, prices): """ :type prices: List[int] :rtype: int """ n = len(prices) leftprofit, rightprofit = [0] * n, [0] * n leftmin = prices[0] for i in range(1, n): price = prices[i] leftmin = min(leftmin, price) leftprofit[i] = max(leftprofit[i-1], price - leftmin) rightmax = prices[-1] for i in range(n-2, -1, -1): price = prices[i] rightmax = max(rightmax, pric..
Computer Science/Coding Test
2021. 11. 3. 21:40