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.
The fixed tests are only the most basic "happy flow" tests that don't check for error cases such as:
/
and%
with0
as second argument (division/modulo by0
)-1
and123456
=
with0
/1
stack items, or:
with an empty stack~
when input is already exhausted (0
is not mappable to a string in languages where strings are0
-terminated).There are no random tests.
It is not specified what value should be fall back to when reading past all inputs/popping from empty stack. (it's
0
)It is also not specified how "integer" and "character" are converted between each other. (it's character code)
Ruby should be upgraded to 3.0
Ruby: No random tests.
Your input spec is confusing... you say "array of numbers" but examples are all ranges of integers beginning with 1 and climbing in ascending order, so it's a bit confusing what you actually want. It's easy and fast to solve with range inputs by just calculating squares starting at the bottom of the range until you get one that's higher than the top end of the range, but that falls apart if you actually need to test "arrays of numbers" (e.g. [24,18,13,60,5,99])... what are the actual inputs? Arrays of numbers or ranges?