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.
Fixed.
The
Java
initial solution still names the parameter asn
instead ofv
. Should be changed to match the description.The rows of the array are columns of map, element number X of each array forms the rows of map
The best post about this kata until now. Very clarifying and helped me solve it.
Thanks.
Done, thanks!
I have to agree. I really liked this, but "n" is used to represent two different things in the description. That's potentially confusing.
To start off with,
'right' => x += 1
'down' => y += 1
In terms of the minemap, it seems kind of counterintuitive visually, but if you're using python, you can check the location using minemap[x][y] to tell you whether you can move to that cell. I'm guessing that's why they set x and y as they did.
If you want to think of it visually, consider the minemap as a list of vectors from left to right, and just transpose each vector in the minemap, now a movement to the 'right' takes you to the the same horizontal spot in the next vector (minemap[x+1][y]) and a movement 'down' takes you to the next entry in the same vector (minemap[x][y+1])
it means, if s==""(empty) return "", else return others
Sorry, that seems like a description bug. Thank you for the report and I will fix it.