Optiver Interview Question

One question was a graph problem