Search⌘ K
AI Features

Solution: Remove K Digits

Solution: Remove K Digits gives you a numeric string and a number of digits to delete. Return the smallest possible number left after removing exactly that many digits.

Statement

Given a string, num, that represents a non-negative integer and an integer k, remove exactly k digits from num so that the remaining digits form the smallest possible number.

Constraints:

  • ...