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.
Maybe it is because of this kata supports only PostgreSQL?
Insomniah, this post is from 3 years ago, when some languages didn't have sample tests. AFAIK, all languages have sample tests now, so, what are you talking about?
Thank you for saying it, I’m already hysterical
I see you got something.
Large, but small enough that it won't overflow your ( CodeWars' ) computer.
There are many ways to solve this kata. You actually can encode the infinite sequence as a finite object, return that, and let testing figure out how to deal with the infinity ( it will ). Or you can approximate
Infinity
with1 000 000
, and return a solution based on that. You also actually can figure this out one number at a time; there are at least two ways to generate values for which it would be impossible to hold the entire sequence up to there in memory.Does this answer your question?
Am I supposed to figure this out one number at a time? The 20th time thru gives a very large sequence!
CW supports PostgreSQL and SQLite only.
return something.
This comment is hidden because it contains spoiler information about the solution
I learned a new function. Thank you.
You must also test to see if the value for a or b is a string. The solution requires you to reject a string value of "2" and accept a numeric value of 2.
I totally agree. It's beyond level 8 kyu for knowledge and skill.
I like the simple documenation.
This line:
earns one point and takes another turn
could easily change to:
earns one point and takes another turn only if another box can be made.
Loading more items...