Leetcode 1323. Maximum 69 Number
Given an integer made only of digits 6 and 9, maximize its value by flipping at most one digit (6↔9). Greedy insight: flip the most significant 6 to a 9 (if any), otherwise leave the number unchanged.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.