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
That is not a requirement though. Neither by description, nor by test.
Also insertion-order preservation in dictionaries depends on the python version.
literally a recursive directory creation.
Had to do this :)
The examples in the description don't reflect the case insensitivity.
As a suggestion remove one lowercase b in
"aabbcdeB" -> 2 # 'a' and 'b'
I ran into this as I primarily looked in the examples ;)
Otherwise a nice one imo
only draw back in this version is the inefficient ammount of recursions.
e.g. if n=1000 you would otherwise run down to n<1 which is not necessary (easy to solve ;))
besides that you might as well break if n == 2 as we know this to be true. No need to to another call to isPowerOfTwo(1) ;)
os.system is dangerous. IIRC os.system will spawn a shell, so you're vulnurable to code injection.