Search
⌘K

Leetcode 2566. Maximum Difference by Remapping a Digit

Given an integer, you may globally remap one digit (replace all occurrences of a chosen digit with another digit); compute the maximum and minimum integers obtainable by exactly one such remapping (leading zeros allowed) and return their difference.


Question Timeline

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

Comments

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