Flexport interview question

OOP question using data structures