Maximum Time
Problem Overview
- Fill '?' characters in a time string (hh:mm) to form the maximum valid time.
- Input: a valid hh:mm pattern with unknown digits; Output: a completed time between 00:00 and 23:59.
- Domain: time formatting and validation for clocks, schedules, or forms.
- From Google interviews; a classic coding interview problem and interview question.
Example
Unlock to view complete problem details
and practice with sample input/output
Was this article helpful?
View Test Cases & Run Code requires membership
Input Variables
Execution Result:
