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.
Description is inconsistent.
Each bit in n will specify whether or not to swap the case
versusbecause 11 is 1011 in binary, so the 1st, 3rd, 4th, 5th, 7th, 8th and 9th alphabetical characters have to be swapped
. You really need to describe this more carefully.It's not obvious from the description that the bits should be in the reversed order, how about an asymmetric example instead of
1001
?This comment is hidden because it contains spoiler information about the solution
number of random tests can be safely increased to ~100
do your random tests work? i get an output 'loll' should equal '' even though my function decode('loll') returns '' (e.g. if i put this case in the sample tests)
also your random tests for decode just test for character combinations, they don't check any number input as well.
Hi,
z
should encode/decode with2