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.
It was a mistake, I fixed it
Fixed :)
cheers!
Haha, I just got it...
That was a lot of fun, thanks zLuki!
In box 3, echo is listed as an available command, but is not recognised as a command or using man :)
Man, I made that trickier than it needed to be. facepalm
Actually I got a working algorithm easily but it was too inefficient. Then I spent all day with Wolfram Alpha for company trying to understand it all. Needless to say, that is not needed. But it was really fun, thanks to AlexIsHappy and all contributors.
I do wish that the code comparisons you see after completion only contain ones for the current kata. I guess this is an issue with Codewars and not this particular kata.
Anyway, really fun so thanks! :D
Great fun!
Thoroughly enjoyed this one, thanks to frenetic_be and anyone who's contributed! :)
Thank you for the advice. I realise it's not the correct way to go about fixing my issues. But it's good to see what results I'm getting back. I will re-examine refactor and retry! It's a good puzzle and my first Kata that needs code optimization. It's a good challenge. Thanks for your advice.
I really do not think that printing makes you pass more tests. What I believe happens is that printing causes more flushing, and more assertions are printed to output panel. Without printing, when timeout occurs, the non-flushed output is lost, and test framework does not get a chance to print assertions or outcome of test which were not displayed. CW test mechanism is IO-based and flushing can make a difference how many test results you see.
You should see all assertions even if you do no printing, and just flush stdout at the beginning (or end) of your solution.
But this does not change the fact that your main problem is performance and timeout you are getting.
Definitely getting more results when I print!! I was always timing out after about 400 ish now, I get over 500 every time!
Edit: I think it's strange too, why can I always get more results when I use a print statement. I realise it doesn't add a lot more complexity, but it consistently allowed me to complete more tests.
Buffer error is because you print too much. Printing itself did not help to pass more tests, maybe it's because random tests sometimes produce easier, and sometimes harder inputs. But still they should pass below timeout.
I was getting a timeout @ 12000 then I added a print statement and completed more tests...the performance test gives me a buffer error (in python)...more head scratching