402
-
[LeetCode] 402. Remove K DigitsLeetCode 2021. 10. 19. 21:09
https://leetcode.com/problems/remove-k-digits/ Remove K Digits - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com Remove K Digits 어떤 수와 k 값이 주어졌을때, 수에서 k개 만큼의 숫자를 지웠을때 얻을 수 있는 가장 작은 수를 출력하는 문제이다. 풀이는 아래와 같다. 일반적으로 자리수가 같은 수를 비교할때, 우리는 앞자리부터 비교하게 된다. 앞자리가 같을 경우 그 다음 앞자리를 비교하고 또 같을 경우..