Search⌘ K
AI Features

Solution: Remove K Digits

Solution: Remove K Digits gives you a numeric string and a number of digits to remove. Return the smallest possible number formed by the remaining 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:

  • ...