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
This comment is hidden because it contains spoiler information about the solution
That would lead to [612235,0,2] instead, you can only move one digit.
I solved it in C. But it only runs the examples succesfully if I comment out the free(act) and free(sact) statements in dotest(), otherwise it crashes with
As said, it runs succesfully when I change the code in the 'Example tests' box but not when I hit attempt. Thanks for the interesting problem, as always.
I vote only 'somewhat' satisfied because the assigment 'Try to do it without if statements' is not enforceable (as witnessed by the C solutions that nearly all use if or switch/case) but this is what makes it a nice little puzzle.