Smallest number after removing k digits
num is a non-negative integer written as a string of digits, with no leading zeros (except "0" itself). Remove exactly k of its digits, keeping the others in their original order, so that the number left is as small as possible. Return it as a string without leading zeros; if no digits are left, return "0".
Constraints: 0 <= k <= len(num). Aim for O(n).
Besides the tests, one large input (6,000 digits, remove 3,000) with a ~200 ms limit (scaled to your device's speed): brute force won't pass.
Examples
smallest_after_removal("2751386", 3)→"1386"smallest_after_removal("30408", 1)→"408"smallest_after_removal("52", 2)→"0"