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