Optiver Interview Question

2 oop based hackerrank questions