networkDelayTime =  (times, n, k) => {
    const { graph, seen, minHeap } = buildGraph(times, n, k) 
    const maxTime = getTime(graph, seen, minHeap);

    return (seen.size === n)
        ? maxTime 
        : -1;
}
https://leetcode.com/problems/network-delay-time/
@param {number[][]} times
@param {number} n
@param {number} k
@return {number}