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 comment is hidden because it contains spoiler information about the solution
Thank you for providing feedback to my code and comments. Next time I'll keep that in mind; documenting how the code works on an abstract level. It's a continuous learning process. :-)
I tried to document my code, but I found that writing clear explanatory comments is hard. Also I made a little mistake (I meant to say subsequent numbers instead of consequent numbers).
Mooi werk jongens.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Well, my mother never taught not to. How should I know it's standard practice? If you don't want your arrays mutated, don't pass them by reference into my functions.
You made a point... you could... but why would you want to?
Hi there! I wasn't being serious when I wrote comments for my code. I really liked the kata and I was just playing around. I completely agree that the solution you propose is more efficient than my code. I do not agree that the predefined function is effectively two random bit generators; it generates only one bit of entropy. That's why all solutions call the one_two() function twice. (Except me, I call it sixteen times :p ). It would still make more sense if one_two() just returned 0 or 1.
Hi there! The algorithm you wrote for finding the greatest common divisor of two numbers is pretty inefficient. There is an algorithm out there that is way faster, and it can be written in just a few lines of code. Check this: https://www.youtube.com/watch?v=in6Z8aSSPiI
Nice one, but it could be simplified to:
I like this solution a lot because it uses object oriented programming and it has a O(1) complexity.
Nice O(n) solution. However the last line can be left out. If a python function has no return statement, it returns None automatically.
+1 for mentioning time complexity. For anyone reading this and wondering what we're talking about, this explains it nicely.
Because it's kinda cheating. And I was feeling a bit Canadian.
Loading more items...