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.
Really fun kata, good stuff
took a while to get my head around it, i still find it confusing how it works lol
yup, it is the size of the grid, and i think maybe it's just a little more readable that way.
I came here to give the same comment.
Upvote this one instead.
Hi
What is the use of the 3rd parameter : size of the grid ?
The length of the 1st parameter : grid has the same value
.
Approved, thanks.
python new test frameworks
This comment is hidden because it contains spoiler information about the solution
Very interesting.
im amazed by these one line solutions!
nicely done.
Oh, I got it now. You were right, I was couting rows and columns (row 0, row 1..., column 0, column 1). Thanks so much!
0, 0 is top left, that's an
a
with x-axis being right-left, that means
@
is two steps right, so x-axis is 2, and it's one down, so y-axis is 1:(x, y)
(2, 1)
I.. don't see how you're getting
(1, 2)
for@
if (1,2) is x,y, then you changed the x coordinate but said you're going up, which is vertical(up/down) movement, but you said x is horizontal(left/right)
.. no clue where we're viewing this differently x)
I explained bad myself, I think. Not talking of writting the grid but the position you should step. I mean, in the first example the first position (the starting "@") should be (1,2) (x,y), and the first step in order to go to the key is going up to (0,2), right? So when you say the array that should be returned with the pair x-y steps, you said "[(2, 1), (2, 0)...", there is where I am lost. Sorry for my clumsy english, I am explaining myself as hell...
Do you mean that you're writing
grid[x][y]
? That would be you swapping them, since grid contains rows, not columns.avoiding the variable names x and y may help. try row and col. and you should always consider re-structuring any input data you receive to suit you.
Hello, sorry for the dumb-newbie question but I don't understand the first example. I mean, I suppose isn't wrong 'cause have been tested and achieved so some of them will pointed to it of ot were the case, but, "x" and "y" seems to be swapped to me. If "x" is for horizontal and "y" is for vertical: won't be "@" (1, 2) and first step to (0, 2), then (0, 1) and so on? Thanks.
Loading more items...