Function that returns length of the longest path beginning with mat [ i ] [ j ] This function mainly uses lookup table dp [ n ] [ n ]
public static int findLongestFromACell ( int i , int j , int [ ] [ ] mat , int [ ] [ ] dp ) {