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.
This comment is hidden because it contains spoiler information about the solution
My solution passes tests, but when I submit it I get "Unknown error" with no other explanation. It doesn't seem to time out, as I get the error rather immediately, I've covered negative values as well.
What could be the reason for "Unknown error"?
No test cases. Wrong test label in the final test (3 `pow` 2 is not 5).
This comment is hidden because it contains spoiler information about the solution
This kata would have been interesting if the results squares could be — as I initially assumed — of any size (3x3, 2x2, etc.). What you're asking is both unclear and uninteresting.
There are no test cases in the Haskell version, and the tests fired upon submission do not match the description: random tests not only include negative input values, but are also expecting nonzero answer in such cases.
This comment is hidden because it contains spoiler information about the solution
Some things are not clear:
Which is correct:
interp e Empty == Nothing
orinterp e Empty == Just ""
?Is it OK for
rep
to join an extraEmpty
at the end? For example:rep 2 (Literal "A") == Literal "A"
Join
Literal "A"Join
EmptyI don't think that the order of elements in the list should matter. For example, for
combinations 4 [1..5]
, all these answers should be correct:[[1,2,3,4],[1,2,3,5],[1,2,4,5],[1,3,4,5],[2,3,4,5]]
[[4,3,2,1],[5,3,2,1],[5,4,2,1],[5,4,3,1],[5,4,3,2]]
[[5,4,3,2],[5,4,3,1],[5,4,2,1],[5,3,2,1],[4,3,2,1]]
For
[1, 1, 2]
the correct answer should be 6, not 8, as there are six different subsets:[], [1], [2], [1, 1], [1, 2], [1, 1, 2]
. I suggest to add a clarification to the problem statement saying that input does not contain repeated items.Indeed. It's quite disappointing. I'm new here, but aren't katas like this supposed to be fixed/removed while still in "Beta"? How was this one promoted to the "Approved" status?