Search
⌘K

Leetcode 2259. Remove Digit From Number to Maximize Result

Given a numeric string and a target digit that occurs at least once, remove exactly one occurrence of that digit so the remaining string represents the largest possible integer. The core challenge is selecting which occurrence to remove (a greedy positional choice) while preserving the original order.

Asked at:

Google

Google


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Early October, 2024

Google

Google

Junior

Find the largest K-digit number that can be formed from a given very long number while preserving the order

Comments

Your account is free and you can post anonymously if you choose.