← Microsoft questions

Smallest number after removing k elements

Filed under Microsoft

Given a non-negative integer represented as a string 'num' and an integer 'k', remove 'k' digits from the number so that the new number is the smallest possible. The result should not contain leading…

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Microsoft questions

Collected from public candidate posts and coding forums. Updated Nov 2026.