path = (src, dest) => {
    if (!Number.isFinite(distance[src][dest])) {
      // dest unreachable.
      return null;
    }

    const path = [src];

    if (src !== dest) {
      (function pushInOrder(src, dest) {
        if (middleVertex[src][dest] === undefined) {
          path.push(dest);
        } else {
          const middle = middleVertex[src][dest];
          pushInOrder(src, middle);
          pushInOrder(middle, dest);
        }
      })(src, dest);
    }

    return path;
  }
Reconstruct the shortest path for a given pair of end vertices.
Complexity: O(L), L - length of the path (number of edges).

@param {string} srce
@param {string} dest
@return {?string[]} Null if destination is unreachable.