longestIncreasingPath = (matrix) => {
    const { graph, indegree, sources } =  /* Time O(N * M) | Space O(N * M) */
        buildGraph(matrix);

    findSources(graph, indegree, sources);/* Time O(N * M) | Space O(N * M) */

    return bfs(graph, indegree, sources); /* Time O((N * M) + WIDTH) | Space O((N * M) + WIDTH) */
}
Topological Sort
Matrix - Graph
Matrix - In-Degree
Queue - BFS
Time O(N * M) | Space O(N * M)
https://leetcode.com/problems/longest-increasing-path-in-a-matrix/
@param {number[][]} matrix
@return {number}