일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- concurrency
- 715. Range Module
- data science
- 109. Convert Sorted List to Binary Search Tree
- t1
- Substring with Concatenation of All Words
- Generator
- Convert Sorted List to Binary Search Tree
- Regular Expression
- 30. Substring with Concatenation of All Words
- shiba
- 운영체제
- Python
- 컴퓨터의 구조
- attribute
- 시바견
- Decorator
- iterator
- Python Code
- 프로그래머스
- Protocol
- LeetCode
- 315. Count of Smaller Numbers After Self
- kaggle
- 43. Multiply Strings
- 밴픽
- 파이썬
- Python Implementation
- DWG
- Class
Archives
- Today
- Total
Scribbling
프로그래머스: 큰 수 만들기 본문
def solution(number, k):
stack = []
for num in number:
while stack and stack[-1] < num and k > 0:
k -= 1
stack.pop()
stack.append(num)
return ''.join(stack[:len(stack)-k])
'Computer Science > Coding Test' 카테고리의 다른 글
프로그래머스: 섬 연결하기 (0) | 2021.10.21 |
---|---|
프로그래머스: 구명보트 (0) | 2021.10.21 |
LeetCode: 105. Construct Binary Tree from Preorder and Inorder Traversal (0) | 2021.10.20 |
LeetCode: 103. Binary Tree Zigzag Level Order Traversal (0) | 2021.10.20 |
LeetCode: 102. Binary Tree Level Order Traversal (0) | 2021.10.20 |