Domanda di colloquio di Optiver

They asked me a medium level leetcode type question that was based on object oriented programming