Hudson River Trading interview question

One DFS problem too, was asked