Optiver Interview Question

two object oriented design problems