alienOrder = function(words) {
    const { graph, frequencyMap, queue, buffer } = buildGraph(words);

    if (!canBuildGraph(words, graph, frequencyMap)) return '';

    queueSources(queue, frequencyMap);
    bfs(queue, frequencyMap, graph, buffer);

    return (frequencyMap.size <= buffer.length)
        ? buffer.join('')
        : '';
}
BFS
https://leetcode.com/problems/alien-dictionary/
@param {string[]} words
@return {string}