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 depends on what you're working on. If this function were part of a website backend counting characters in usernames or something, it doesn't really matter at all. But if this is a helper function that is responsible for comparing billions of base pairs in genetic sequencing or part of a stock trading platform where microseconds matter, then you need to rethink it.
Would it matter? I assume itll be a O(2n) vs O(n) but I'm not sure if that's a big deal.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Hi! Really helpfull, thank you!
Another piece of information which was missing (or I could not deduce it from the kata details): the "Dot" letter has an influence on the notch. As a matter of fact, the dot letter leads to an offset between the notch and the visible position in the window.
If notch is "Q" and dot letter is "A", then the notch causes rotation when "Q" is diplayed in the window.
If notch is "Q" and dot letter is "Z", then the notch causes rotation when "P" is diplayed in the window, because Z has an offset of 25 towards A (0 position) => Q + offset of 25 gives "P".
If notch is "Q" and dot letter is "M", then the notch causes rotation when "C" is diplayed in the window, because N has an offset of 12 towards A (0 position) => Q + offset of 12 gives "C"
This comment is hidden because it contains spoiler information about the solution
anybody that knows more than print("Hello World!") finds this code readable.
actual solution that should be voted best practice. this site really needs a downvote button to downvote shit answers
What does the n != do
xrange
is Python 2, it was removed in Python 3. It is a very old solution, written when CW used Python 2.my pycharm wrote that this line is wrong:
If I try "range" insted of "xrange", it is good
self.dimension, dimension have the same id.
Lol, me too. In case I need to translate it to C later.
same!
because the func compare 2 sets ! originally ascii is a string ! You cant compare 2 different types !
Loading more items...