← Microsoft questions

Remove n digits to get minimum number

Filed under Microsoft

Given a string representing a non-negative integer and an integer n, remove exactly n digits from the string so that the resulting number is as small as possible.

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.