TuSimple Interview Question

graph, DFS, BFS, matrix, bit manipulation