Fanatics interview question

BFS, min cost graph, SQL