Problems > Valid Clock Time > Editorial

Valid Clock Time — Solution & Editorial

Back to the Problem

Fixed-format parse: length 5, colon at index 2, numeric fields with HH < 24 and MM < 60.

Complexity: O(|S|)