Optiver Interview Question

Refer hard logic problems on combinatorics on brilliant.org