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.
This seems abnormally hard for a 5. 5 seems like a good rating for a straightforward, no frills, BFS problem. This is not that.
"Doublets" is a problem where, given a dictionary and start & target words, you want to find the shortest way of modifying the start word letter-by-letter until it matches the target. Each modified word has to be in the dictionary. See https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=31&page=show_problem&problem=1091
This is basically equivalent to this problem, with prime-testing replaced by dictionary look-up. Would it be worth creating this version as a kata, or would it be regarded as a duplicate?
This comment is hidden because it contains spoiler information about the solution
The description of the performance requirements are mainly there to let the user know how many tests they are going to need to face, as previouly requested by @dfhwze. It might be a bit too much to create a full section for it, so I have now changed it up a bit to include the number of tests in the intro instead :D
I see, I'll keep this in mind.
The is_prime function came first, but later on I got to use @mauro-1's solution which involved gmpy2.is_prime. I had simply forgot to remove the regular function, thanks for noting that :D
Why are you using a custom
is_prime
function on top of importinggmpy2.is_prime
in the verification code?Sorrryyy, I'll fix it right away xD
Should be fixed now :D
I would like to translate this Kata to C++ but, the list of the primes in the tests hurts my eyes lol
Thank you for your support! I hope this Kata will be translated too :D
Cool kata!
I liked the combination of different topics (Graph theory and Number Theory).
The description makes it funny, although as a non-native English speaker, I had to slow down a bit while reading, as I'm not that familiar with Old English (I've seen a bit of it before, though). It was a nice detail, anyway.
Will be cool to see translations to other programming languages over time.
Hi again! (should be my last message)
This is a minor issue, but your long list of primes (in the tests) is breaking code mirror syntax highlightening, which makes the code of the tests a pain to read. Could you:
Thx
Side notes, for your next kata:
fail
).Cheers
Hi,
You should remove the notes in the description about performances : none are actually involved (I see lots of suboptimal solutions rebuilding constantly the possible paths or using O(N) operations where constant time is possible).
Cheers
Thanks for the suggestions, I've added some new tags! :D
Loading more items...