Amazon Interview Question

Leetcode, OOP. Depends on the interviewer