Frage im Vorstellungsgespräch bei Optiver

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