longestIncreasingPath = (matrix, maxPath = 0) => {
    const [ rows, cols ] = [ matrix.length, matrix[0].length ];

    for (let row = 0; (row < rows); row++) {/* Time O(N) */
        for (let col = 0; (col < cols); col++) {/* Time O(M) */
            const path = dfs(matrix, row, rows, col, cols);/* Time O(2^(N + M)) | Space O(HEIGHT) */

            maxPath = Math.max(maxPath, path);
        }
    }

    return maxPath;
}
Brute Force - DFS
Time O(2^(N + M)) | Space O(N * M)
https://leetcode.com/problems/longest-increasing-path-in-a-matrix/
@param {number[][]} matrix
@return {number}