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.
GISTS
list is very particular: each key is a power of 2.If you think in binary representation, each key is tied to one particular bit, then each gift corresponds to this very bit.
Take the binary representation of a number
n
and look at each of its turned on bit (1
).It gives you a list of gifts as one bit matches one gift.
Finally all you need to do is to sort the answer to output an alphabetically sorted list.
Is it more understandable now?