leetle

Daily challenge for 2025-08-28

240. Remove K Digits

Write a function solve that removes k digits from the number string num so that the new number is the smallest possible. Return the result without leading zeros (unless the result is '0').

Example:
Input: num = '1432219', k = 3
Output: '1219'

Run this challenge interactively in Python or JavaScript when the app loads.