initial leg work for depth first search algorithm for finding the longest increasing path in a 2d array