Pergunta de entrevista da empresa Jane Street

Just standard Leetcode OOP/DSA question