Function to find Longest Possible Route in the matrix with hurdles . If the destination is not reachable the function returns false with cost INT_MAX . ( i , j ) is source cell and ( x , y ) is destination cell .
Pair findLongestPathUtil ( int mat [ R ] [ C ] , int i , int j , int x , int y , bool visited [ R ] [ C ] ) {