Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Gotcha. Thanks.
Note that "input" in the description does not mean just any combination of four digits, it means a combination of four digits that is guaranteed to make up a valid time, or it would not be inputted to the function.
So you can guarentee that random tests will not provide any inputs that are not possible to construct a valid time. This sounds much better than "Every input has a valid answer.". Thanks.
No it's probably me who's being difficult, but I have no good idea how to express it in a clearer way. Maybe like this:
Tests pass to your function only inputs, which have a valid answer.
Or: when your function is called, it is guaranteed to be called only with digits which have a valid solution.
Or: Your function will not be called with digits which cannot be used to build a valid 24-h time.
Or: Only inputs which have valid answers are tested.
Does any of these sound better?
I am sorry but, the description is just ambigious or am I just being difficult? It said "every input". Not 'every possible input that can yield valid answer'. So I suppose, 5,6,7,8 is part of every input. If the statement is "every possible" input then sure, your statement is correct.
These can be any possible combination of four digits which is guaranteed to have a valid answer. it can be
1 1 1 1
, it can be1 2 3 4
, it can be5 6 9 0
, but it will never be5 6 7 8
.Are 4 digits supposed to be the ones from test cases only or all possible digits? If so 'Every inputs have valid answer' might not agree with the input 5,6,7,8 .
Because 21:59 is later in the day than 19:25.
In the example section, we have
digits: 9, 1, 2, 5 => result: "21:59"
why can't it be
digits: 9, 1, 2, 5 => result: "19:25"
?same here
I don't yet understand how I got this, I was just randomly trying it out and it passed all the tests.
I am having the same issue
EDIT: never mind, solved it, turns out I was reading for length before checking if the array is null or not. thanks to @Chrono79
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
lol
Loading more items...