Search
⌘K

Leetcode 3114. Latest Time You Can Obtain After Replacing Characters

Given a "HH:MM" 12-hour time string with some digits replaced by '?', replace all '?' to form the latest valid time (hours 00–11, minutes 00–59). This is solved by making greedy, position-wise digit choices under the positional constraints (e.g., hour tens and ones bounds, minute tens ≤5).


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.