Bloomberg interview question

Leetcode Mediums + OOP design question