CarGurus interview question

Typical ease/medium leetcode type of problem