Remove K Digits
medium
Given string num representing a non-negative integer num, and an integer k, print the smallest possible integer after removing k digits from num.
Constraints
1: 1 <= k <= num.length <= 10^5 2: num consists of only digits. 3: num does not have any leading zeros except for the zero itself.
Format
Input
A string num A number k
Output
A string representing smallest possible integer after removing k digits from num. Output should not contain any leading 0 except for the 0 itself.
Example
Sample Input
1432219
3
Sample Output
1219
Question Video