Add Minutes to a Clock
time is a 24 hour clock reading written "HH:MM" (two digits each). Return the reading shown after minutes more minutes have passed, in the same "HH:MM" format. The clock wraps around from 23:59 to 00:00.
Example 1
time "10:45"
minutes 30
returns "11:15"
11:15.
Example 2
time "23:50"
minutes 20
returns "00:10"
00:10 (the next day).
Constraints
timeis a valid"HH:MM"reading0 <= minutes <= 10**6
Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.