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.
I'm trying to avoid that temptation, but I've been searching for hours on how to call an anonymous class within an anonymous class and the kata doesn't seem to accept any of the solutions I've tried.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Let's say you have to find if there is a prime gap of 30 between 1000000 and 1000040, you have calculated all the prime numbers until 1000040 instead of only checking which of those 40 numbers were primes, I don't think that's ok.
Hint: you need to multiply two numbers to get a number. Let's say you're checking if
2 * 13 = 26
is prime: By the you get to "13 is a divisor by 26", you'd already have checked "2 is a divisor by 26" ;-)This comment is hidden because it contains spoiler information about the solution
Half
is too much, you need a better estimate ;-)This comment is hidden because it contains spoiler information about the solution
Checking for primality is expensive (in time), so why are you calculating all primes between 1 (that's not a prime number btw) and
n
?This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
For string that could be in multiple lines you need
\A
/\Z
instead to match the entire string:https://stackoverflow.com/questions/4250062/what-is-the-difference-between-and-a-and-z-in-regex
This comment is hidden because it contains spoiler information about the solution
Loading more items...