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