Search
⌘K

Leetcode 2437. Number of Valid Clock Times

Given a "hh:mm" string with some digits replaced by '?', count how many valid times can be formed by substituting each '?' with 0–9 under the constraints 00–23 for hours and 00–59 for minutes. The core challenge is computing the number of valid digit choices (product of independent choices for minutes and constrained choices for hour digits, where the first hour digit depends on the second).


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.