Leetcode 2769. Find the Maximum Achievable Number
Find the largest integer x that can be transformed into num in at most t operations, where each operation independently increments or decrements both x and num (so their difference changes by 0 or ±2). Equivalently, maximize x subject to x - num being even and |x - num| ≤ 2t.
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.