Available question text
Given an integer, you may independently replace all occurrences of one digit with another (for each of two results) and must produce two valid non-zero integers with no leading zeros; return the maximum possible difference between them. The core challenge is picking the digit substitutions that greedily maximize one result (e.g., turning digits to 9) and minimize the other (while avoiding invalid leading zeros).
Related questions
Continue with questions that share topics or the same question type.
- Maximum Candies You Can Get from Boxes
Coding · Array · Breadth-First Search · Graph Theory
- Maximum Number of Coins You Can Get
Coding
- Maximum Points You Can Obtain from Cards
Coding
- Build Array Where You Can Find The Maximum Exactly K Comparisons
Coding
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 1432. Max Difference You Can Get From Changing an Integer
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source