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