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.
non-pythonic closure abusing python solution .. check
Had to run it a couple of times to hit that <12s runtime.
/*
1 2 3
4 5 6
7 8 9
*/
// free_patterns - {1: [2, 4, 5, 6, 8]} means you can go from 1 to 2,4,5,6 or 8 only if they have not been passed through already
// jump_patterns - {1: {2:3, 4: 7, 5: 9} means you can go from 1 to 3 passing through 2, from 1 to 7 passing through 4 and from 1 to 9 passing through 5 only if 2,4 or 5 have been visited and 3,7 or 9 respective have not been visited
// could add another check for length > 9 to return 0 because it's impossible but meh
Python version is so broken I passed by pressing attempt a couple of times until I saw green and just clicked "submit". One of those cases where you push to prod and quit I guess.
The comments below mention all the proglems I was going to mention so can this kata be removed? Clearly in so many years nobody thought it needs fixing.
pretty much what I did but using the language properly. very nice