The heads of sequences... OK.
the solution of this kata seems to have an issue:
for base 16, it requires number 2047 in the solution-list.
My solution list ( without this number ) is rejected.
But 2047 ( = 89 * 23 ) is no prime.
i guess the issue is caused by an underlying issue of the fast_is_prime-function procvided by you.
fast_is_prime(2047) = True
There is a similar issue for base 19:
14044103 (5CEA66) => 739163 (5CEA6) => 38903 (5CEA) => 2047 (5CE)
This comment is hidden because it contains spoiler information about the solution
No it's not.
However including all prime numbers in list allows to randomize tests a little more by asking for random ranges of prime sequence for a given base.
Iterative vs recursive only matters if you want to generate prime number list in order (BFS vs. DFS).
You should add in description that order doesn't matter.
Hey, I'd just like to know if such a shape is a valid input:
I would suggest to make the task actually return all right-truncable primes, not just heads of sequences. IMHO, it just complicates things a little bit.
Believe I've fixed the issues, thanks for correcting me
Sorry about that haha, I meant to change that in the hidden test cases
This is my first kata and there's not much in the way of instruction for this that I found, so thanks for this
It seems like all of the random tests for python return 0, which it should not do.
'kay I figured that on my own, but thx for the answer.
Note that your solution is very slow. So you need to improve it otherwise you won't be able to push the number of tests. Note also that some maths could be used to reduce drastically the amount of computations in some cases. That might be interesting to add that. Maybe it could be worth of unpublishing the kata so that you can polish it a bit?
Mine being without optimisation (apart from the rules I check or not), I get things like this:
Completed in 214.00ms
Completed in 3034.33ms
Completed in 0.18ms
Completed in 0.47ms
Completed in 0.78ms
Completed in 1.45ms
Completed in 0.04ms
Completed in 0.20ms