Optiver Interview Question

System design coding question in Python