The client has made the following changes to the job.
Client prefers freelancers from:
You are still able to submit a proposal for this job.
The client prefers freelancers from
a different location.
Find the length of the longest increasing sequence through adjacent numbers (including diagonals) in a rectangular grid of numbers in a language of your choice. The solution should handle grids of arbitrary width and height.
For example, in the following grid, one legal path (though not the longest) that could be traced is 0->3->7->9 and its length would be 4.
8 2 4
0 7 1
3 7 9
The path can only connect adjacent locations (you could not connect 8 -> 9), and cannot connect equal numbers (you could not connect 7 -> 7). The longest possible sequence for this example would be of length 5 by tracing the path 0->2->4->7->9 or 1->2->4->7->8.
Sign in or Register to see more