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.
bro, it's not about the algorithm, take a closer look at the test numbers about -1, and you will understand what the point is)
Heap while a good idea, is going to take too long, there is a faster approach, that wouldn't require making all the permutations.
Can you please give a hint? Probably I totaly forgot algebra, I don't understand how to solve it in the math way...