6 kyu
Simple time difference
588 of 1,513KenKamau
Description:
In this Kata, you will be given a series of times at which an alarm sounds. Your task will be to determine the maximum time interval between alarms. Each alarm starts ringing at the beginning of the corresponding minute and rings for exactly one minute. The times in the array are not in chronological order. Ignore duplicate times, if any.
For example:
solve(["14:51"]) = "23:59". If the alarm sounds now, it will not sound for another 23 hours and 59 minutes.
solve(["23:00","04:22","18:05","06:24"]) == "11:40". The max interval that the alarm will not sound is 11 hours and 40 minutes.
In the second example, the alarm sounds 4
times in a day.
More examples in test cases. Good luck!
Algorithms
Date Time
Strings
Similar Kata:
Stats:
Created | Aug 17, 2018 |
Published | Aug 17, 2018 |
Warriors Trained | 5311 |
Total Skips | 136 |
Total Code Submissions | 11049 |
Total Times Completed | 1513 |
JavaScript Completions | 472 |
Ruby Completions | 62 |
Python Completions | 588 |
C Completions | 44 |
C++ Completions | 117 |
Java Completions | 119 |
C# Completions | 115 |
Rust Completions | 44 |
Total Stars | 175 |
% of votes with a positive feedback rating | 90% of 333 |
Total "Very Satisfied" Votes | 282 |
Total "Somewhat Satisfied" Votes | 38 |
Total "Not Satisfied" Votes | 13 |
Total Rank Assessments | 7 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 6 kyu |
Lowest Assessed Rank | 7 kyu |