일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- LeetCode
- 715. Range Module
- t1
- Class
- 43. Multiply Strings
- Convert Sorted List to Binary Search Tree
- Python Code
- Decorator
- 밴픽
- 컴퓨터의 구조
- 109. Convert Sorted List to Binary Search Tree
- kaggle
- concurrency
- iterator
- Python Implementation
- Generator
- 파이썬
- Regular Expression
- Python
- 운영체제
- 315. Count of Smaller Numbers After Self
- data science
- Protocol
- DWG
- 프로그래머스
- 시바견
- shiba
- Substring with Concatenation of All Words
- attribute
Archives
- Today
- Total
목록155. Min Stack (1)
Scribbling
LeetCode: 155. Min Stack
class MinStack: def __init__(self): self.stack = [] def push(self, val: int) -> None: if not self.stack: self.stack.append([val, val]) else: self.stack.append([val, min(val, self.stack[-1][1])]) def pop(self) -> None: self.stack.pop() def top(self) -> int: return self.stack[-1][0] def getMin(self) -> int: return self.stack[-1][1] # Your MinStack object will be instantiated and called as such: # ..
Computer Science/Coding Test
2021. 11. 30. 13:41