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.
In fact, this kata suffers from a lack of performance constraints. Some rather naieve solutions pass.
Isn't this solution rather slow? It should have a runtime of O(n^n), compared to solutions like the one of g964 which has a runtime of O(n) it should not be prefered even if it might be more easy to read and easier to understand.
Random tests added, description merged from C# translation
It should use monads. Your translation does not. Therefore I rejected it.
This comment is hidden because it contains spoiler information about the solution
introducing test cases that makes it impossible to submit solutions where the numbers between 1 and n are just added together, since the naive solution lies is O(n) compared to the optimal solution which lies in O(1)
This solution is not correct, is fails if the hal function finds a number which is equal to the h and the overall lowest number was already found. See my other solution for the corrected version.
Not all transitions are tested.
How about random tests too?