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.
In many cases it's more simple and less frustrating just to write from scratch instead of figure out what the problem is.
This comment is hidden because it contains spoiler information about the solution
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, ... not sure I agree. But to make everyone happy, I've done some renaming.
there is nothing to replace because None gets returned if the path is not valid
This is most commonly used in electrical engineering.
Instead of incrementing bits (representing switches) by their integer value, you want to increment them so that only one bit/switch changes.
That way you prevent two switches to change at the "same" time, resulting in inaccurate measurements.
This is called "single-distance codes".
The Gray Code is one possibility to arrange your bit range exactly like that and can be used in accurate position encoding.
In this kata we wrote a function to give the integer value of the numth position of the gray code.
Though I'm not sure what that integer would be used for.. the inverse does give the current position during incrementation.
This comment is hidden because it contains spoiler information about the solution
The pre defined function takes n as an argument, not num. The descrepancy between the description and the pre written code is a bit confusing.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
very clear solution, thanks
This comment is hidden because it contains spoiler information about the solution
Just writing new code is not the intention of this kata I think.
Most pythonic solution to the task itself, though.
Loading more items...