Warner Bros. Discovery interview question

leetcode medium-hard questions. Simulate logic for a 24 hr clock hrs:mins