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.
It's no bad thing to import modules if they get the job done! There's a time and a place for code golf. That said - with the distance of several years' hindsight - I should probably have added a short comment.
Not sure if linking comments works here but there is a reply to MrSoto from a few years back where I expand the code with line by line explanation. Can expand on that if it's unclear, although it's been a while :-)
well now that's just verging on unreadable :-)
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Ah :-D that'd do the trick. I'm a blind ... mouse, I guess. Thanks!
Perhaps I misunderstand, but there seems to be a bug in the second annotated example (Python):
The piper is at (row 1, col 0).
The rat at (row 3, col 2) is heading ↙ to (row 4, col 1),
so it was (2 rows + 2 cols) away, and will be (3 rows + 1 col) away.
Using Euclidean distance, this is a distance increase of sqrt(8) to sqrt(10) units,
i.e. the rat is heading away, but the example labels the rat as non-deaf.
Deaf rats have a hard enough life in Hamelin without being labelled as non-deaf! Any suggestions?
Thanks
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
lol, disregard. obviously that final line should be min(..)
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution