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.
It would be acceptable if sorting remains unspecified; the description gives only sorted examples but at least there is an example test with an unsorted list.
The description explicitly specifies sets though, and those cannot contain duplicates. This must be addressed, one way or the other.
It isn't, dw. It was just cleaner to do it the way I did (making the Haskell block the same as the Scala block).
A recent Haskell translation has modified the description. Make sure this translation is not undoing those changes.
Description never specified the input is sorted, and it isn't in Python either.
Tests definitely should not generate duplicate entries though, Python explicitly generates sets (and then splats those sets into varargs which is a design choice of all time).
We went with BigInts because we didn't want to change the description too much.
Scala translation
approved by someone.
Is it just me or is this test now missing from Python?
One last question -
Long
s orBigInt
s?.
It's been a while since I dabbled in Scala. I see that, since then, Stream has been deprecated in favor of LazyList.
I'd rather fit the tests to the description than the description to the tests.
I would have Scala return either an Iterator or LazyList depending on what you think is better. I would suggest a
LazyList
personally since it allows some fun and creative solutions.Input is not a set but a list. That list is not necessarily sorted and may contain duplicates.
This should very much be specified in the description.
Thanks. Approved.
Loading more items...