What does this mean: in increments of fours? Your example looks like it takes 4 adjacent numbers, not every 4th number.
Start at the top left, get the 4 numbers down left first and then the four...
Type: Posts; User: Norm
What does this mean: in increments of fours? Your example looks like it takes 4 adjacent numbers, not every 4th number.
Start at the top left, get the 4 numbers down left first and then the four...
Are you asking how to add 4 to a number instead of adding one?
row 0, row 4, row 8, row 12 etc
Add one to row to go down.
Add one to column to go right.
Subtract one from column to go left.
In all cases: Test if past bounds of array.
Ok, you posted a 4x4 grid. The logic would be the same. What are the changes in row and column for down & left and what are the changes for down & right?
How many starting locations have a path through 4 other squares?
Perhaps drawing a grid and labeling the squares with their row/column indexes would show you how the row and column values change as you go from square to square in a diagonal direction.