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.
Fixed
Well, if it eases your pain, browsing other people's solutions and suggesting a similar tweak to another user, I remembered that instead of checking every odd number, just going for 6k+/-1 is much more efficient and edited my solution accordingly.
I suppose that after many similar problems (I did a lot with primes) one's mind goes fully autopilot ;)
Yeah, it actually is... Funny thing is, I found this same problem somewhere else and I used C and I did what you just said. I didn't give it much thought I suppose :P
Testing up to the square root of num is way more efficient, I presume :)
The test cases seem to be wrong. This:
test.assert_equals(rot13("test","grfg"))
test.assert_equals(rot13("Test","Grfg"))
Should look like this:
test.assert_equals(rot13("test"),"grfg")
test.assert_equals(rot13("Test"),"Grfg")
or else the test will always fail. But there's isn't any problem while submitting...