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