Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 1946. Largest Number After Mutating Substring
Given a numeric string and a mapping for each digit, choose at most one contiguous substring to replace each digit by its mapped value so the resulting integer is as large as possible. The key is a greedy scan: start mutating at the first index where the mapped digit is larger and continue while mapped digits are >= original, then stop.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.