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.
TypeScript fork
bigint
s instead ofNumber
s, fixing this issue and this suggestionwarning: this will invalidate all current solutions
Prolog translation
Currently, there is an inconsistency between the description and the tests (TypeScript): The description is asking for an
Iterator<BigInt>
whereas the tests are asking forIterator<number>
. In consequence, when we submit a valid implementation usingBigInt
then the tests fail.Ok I finally unlocked the solution--my first unlock--after hours of making this more complicated. Now I see that the accepted solutions return the same value as my code did. When I paste some of those accepted solutions and Try or Attempt, I still get the failure message. So I think something is off with the testing and I am reporting this as an issue. The Kata is still fairly interesting and instructive, but this should be resolved
The translation can't really be made language-agnostic ( different languages use different types, and they should be specified ), but it can be cleaned up with some language-specific blocks. I think it should; with every added language it will just get messier. I don't really feel up to doing that myself though.
This comment is hidden because it contains spoiler information about the solution
( TS )
The
Iterator
is tested beyond MaxInt. That gives problems.Not creating an
Issue
because it's old and authors may have fled the scene, but it really is.I think this should be updated (or a new version of it) to use bigint, not number. Or in the details it should state that the result goes until Number.MAX_VALUE then NaN, and not "an infinite sized, sequential".
This comment is hidden because it contains spoiler information about the solution
I think there is some bug in the tester code. I think it'd ask for numbers larger than
Integer.MAX_INTEGER
sometimes in the Java implementation.This comment is hidden because it contains spoiler information about the solution