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.
Instructions are not precise, the length of array are not always 5 in random tests. Downvote for author :)
Well, I solved it by making a very simplistic (after all you only ever have 3 choices for each state) decision tree. It's by no means as complex as even a basic 'real' tree, but still other people solved it in +-5 lines of code by reverse Engineering the game logic.
It's really your call whether you want to do the same and get the easy logic solution, or instead use this as decision tree training.
You can solve it using math in O(1).
Thank you! :)
it's not about math, it's about mem and alg optimization. Brute algoritm don't work.
Looks like most interesting kata so far