Jane Street interview question

Just standard Leetcode OOP/DSA question