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.
I got an error that expected 'good luck' be returned. How does this account for that?
This comment is hidden because it contains spoiler information about the solution
I cannot pass your random tests for a reason that I don't know your EXACT algorithm. For this reason the order of combinations in the resulting list is different in my solution and your solution. Why wouldn't you implement simple sorting of the solutions to accept the results of different but correct algorithms?
Great Solution!
It's all about two lines, while I spread a 'mudyanka' in my code))
A ternary is equal to an if... else.
"Ok", but you still keep a few dozen kata solutions public...
I am confuesed ? Why did you publish the same Kata twice (both of which apparently have about 50% upvotes) And have mistakes in them ?
I maybe a bit new here but I don't think that you are supposed to do that (feel free to correct me if I am wrong)
Also impressive job on the honor gain (less than 2-3 weeks and you are at 2k). Where did you go wrong with the creation of these kata's.
Awaiting an answer :)
Damn, I missed that. That would have been even easier.
OK, I will say it myself: This is a duplicate.
the truth is: at that moment, author put his reference solution in the initial code block, so I just need click submit button...
I beg to differ. There are
0
ways to choose2
elements from0
elements. Depending on your intuition, maths do not always make intuitive sense.However, there is exactly
1
way to choose0
elements from0
elements. This testcase is sorely missing, which is really an additional issue.What he means is: It's a duplicate.
Of both Combinations, which you could have translated, and Combinations ( which should have been a translation of former, but I claim youthful innocence and I didn't know Haskell at the time ).
Apart from that, description does not specify whether or not
array of number
can contain duplicates. This matters. A lot. But please don't fix it, just unpublish this duplicate.Don't resolve an Issue Report until you've actually fixed it.
This comment is hidden because it contains spoiler information about the solution
This test case does not make logical sense - one simply cannot choose 2 items from a collection of 0 items (and therefore should be treated as an error unless otherwise stated). Since this edge case goes against intuition, it should be explicitly clarified in the Description.
The point is to make combination generation clean like in other languages ;-)
Loading more items...