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.
Approved.
Great suggestion! I've adjusted the description for now, however, I feel like it could use some clarification (eg: Use whatever the language's primitive
int
type's max value is (or its equivalent)? Or opt for the biggest possible integer type?). Input is welcome!That change was reverted, as was noted in a later comment in that chain. The tests for other languages also only go up to
2**53-1
. ^I seem to have missed the test case for
9223372036854775808ull
when looking through your C code and approved it. I've removed said test case now, at a quick glance I think the random tests can also go above2**53-1
(specificallyntest = ge_uint(150u, 200u);
would give pretty large numbers if those are the exponents)? (I'm not too familiar with C though)Approved.
Approved.
Valid point, I've reverted the description. Let's just have
Number.MAX_SAFE_INTEGER
as an arbitrary limit for simplicity's sake then. I did add a note about not needing to manually validate input however.Although there's no specific tests for BigInt types, I did end up changing the description to "any finite positive integer greater than 0". Thanks for your feedback!
Thank you for your input! I've adjusted the description accordingly.
I've added a set of random tests now. Each one generates a set of random powers of 2 and passes the sum of them onto the powers function. I believe this should be sufficient.