Morgan Stanley Interview Question

C++ algorithm and OOP questions