LendingTree interview question

Leetcode medium difficulty question, OOP principles, API design.