I generated 20 million primes, but when verifying the 5 millionth - 5 million and 13th prime, it says StopIteration?? But checking externally, the cases should pass just fine. Please help me understand this issue.
The exact form of the returned thing depends on language. You can also check example tests to see how the returned value is handled and how it should behave. I think you are trying to solve with Python, right? If you are working with Python, then your solution sohuld return an iterator which implements __next__ dunder, and can be passed to next function.
Hello. I may be asking a strange question, but what should the program return? I mean, I wrote an infinite prime number generator, but how do I connect it to this katya so that she accepts it all? Simple output of numbers is obviously not suitable.
Ok, I feel really really stupid here but can someone guide me through the first step of creating something that allows "next" in a static method?
I need to return an "iter" on an array in the method?
Do I need to pre-populate the array with the millions of primes?
That was one hell of a Kata, had it open for about 2 weeks and finally finished it today. Was just a case of wrangling with a certain algorithm which shall not be named to get it to work efficiently. Also using numpy arrays instead of lists.
Same here. I've tried 3 different Sieves with lazy and non-lazy versions and they all time out. Python test cases accept the most straightforward and non-optimized algorithm
That's a Sin
why so much code?
I generated 20 million primes, but when verifying the 5 millionth - 5 million and 13th prime, it says StopIteration?? But checking externally, the cases should pass just fine. Please help me understand this issue.
😂😂 Best Code ...
The exact form of the returned thing depends on language. You can also check example tests to see how the returned value is handled and how it should behave. I think you are trying to solve with Python, right? If you are working with Python, then your solution sohuld return an iterator which implements
__next__
dunder, and can be passed tonext
function.Hello. I may be asking a strange question, but what should the program return? I mean, I wrote an infinite prime number generator, but how do I connect it to this katya so that she accepts it all? Simple output of numbers is obviously not suitable.
LMFAOOOOOOOOOOO
Ok, I feel really really stupid here but can someone guide me through the first step of creating something that allows "next" in a static method?
I need to return an "iter" on an array in the method?
Do I need to pre-populate the array with the millions of primes?
That was one hell of a Kata, had it open for about 2 weeks and finally finished it today. Was just a case of wrangling with a certain algorithm which shall not be named to get it to work efficiently. Also using numpy arrays instead of lists.
breo what the skibidi
Same here. I've tried 3 different Sieves with lazy and non-lazy versions and they all time out. Python test cases accept the most straightforward and non-optimized algorithm
I guess, rust tests cases are not fair
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
How ingenious! Hope to figure out the magical mechanism.
I see why your comment has a -73 rating now.
Loading more items...