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 and 23:59.
  • Only inputs which have valid answers are tested.
Date Time
Fundamentals
Algorithms

Stats:

CreatedFeb 1, 2017
PublishedFeb 1, 2017
Warriors Trained10916
Total Skips438
Total Code Submissions23624
Total Times Completed2886
Python Completions1446
Haskell Completions46
Fortran Completions5
Raku Completions6
Pascal Completions8
Erlang Completions4
Haxe Completions4
Reason Completions2
D Completions5
CFML Completions3
Factor Completions9
Scala Completions11
CoffeeScript Completions9
Elm Completions5
Nim Completions6
PureScript Completions2
JavaScript Completions867
VB Completions14
Perl Completions4
Crystal Completions8
Objective-C Completions4
F# Completions7
Racket Completions6
PowerShell Completions14
OCaml Completions9
CommonLisp Completions13
Elixir Completions5
R Completions8
Julia Completions4
Clojure Completions9
Dart Completions47
Groovy Completions6
Lua Completions20
Swift Completions28
Ruby Completions30
C# Completions107
C Completions31
Go Completions27
Rust Completions28
TypeScript Completions42
Kotlin Completions34
PHP Completions36
Java Completions63
C++ Completions57
Total Stars236
% of votes with a positive feedback rating91% of 340
Total "Very Satisfied" Votes291
Total "Somewhat Satisfied" Votes40
Total "Not Satisfied" Votes9
Total Rank Assessments10
Average Assessed Rank
6 kyu
Highest Assessed Rank
5 kyu
Lowest Assessed Rank
7 kyu
Ad
Contributors
  • nirgn Avatar
  • natan Avatar
  • user5036852 Avatar
  • rowcased Avatar
  • monadius Avatar
  • hobovsky Avatar
  • jebreen Avatar
  • akar-0 Avatar
  • KayleighWasTaken Avatar
Ad