6 kyu
The latest clock
1,446 of 2,886nirgn
Description:
Write a function which receives 4 digits and returns the latest time of day that can be built with those digits.
The time should be in HH:MM
format.
Examples:
digits: 1, 9, 8, 3 => result: "19:38"
digits: 9, 1, 2, 5 => result: "21:59" (19:25 is also a valid time, but 21:59 is later)
Notes
- Result should be a valid 24-hour time, between
00:00
and23:59
. - Only inputs which have valid answers are tested.
Date Time
Fundamentals
Algorithms
Similar Kata:
Stats:
Created | Feb 1, 2017 |
Published | Feb 1, 2017 |
Warriors Trained | 10916 |
Total Skips | 438 |
Total Code Submissions | 23624 |
Total Times Completed | 2886 |
Python Completions | 1446 |
Haskell Completions | 46 |
Fortran Completions | 5 |
Raku Completions | 6 |
Pascal Completions | 8 |
Erlang Completions | 4 |
Haxe Completions | 4 |
Reason Completions | 2 |
D Completions | 5 |
CFML Completions | 3 |
Factor Completions | 9 |
Scala Completions | 11 |
CoffeeScript Completions | 9 |
Elm Completions | 5 |
Nim Completions | 6 |
PureScript Completions | 2 |
JavaScript Completions | 867 |
VB Completions | 14 |
Perl Completions | 4 |
Crystal Completions | 8 |
Objective-C Completions | 4 |
F# Completions | 7 |
Racket Completions | 6 |
PowerShell Completions | 14 |
OCaml Completions | 9 |
CommonLisp Completions | 13 |
Elixir Completions | 5 |
R Completions | 8 |
Julia Completions | 4 |
Clojure Completions | 9 |
Dart Completions | 47 |
Groovy Completions | 6 |
Lua Completions | 20 |
Swift Completions | 28 |
Ruby Completions | 30 |
C# Completions | 107 |
C Completions | 31 |
Go Completions | 27 |
Rust Completions | 28 |
TypeScript Completions | 42 |
Kotlin Completions | 34 |
PHP Completions | 36 |
Java Completions | 63 |
C++ Completions | 57 |
Total Stars | 236 |
% of votes with a positive feedback rating | 91% of 340 |
Total "Very Satisfied" Votes | 291 |
Total "Somewhat Satisfied" Votes | 40 |
Total "Not Satisfied" Votes | 9 |
Total Rank Assessments | 10 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 5 kyu |
Lowest Assessed Rank | 7 kyu |