Lyft interview question

Leetcode type interview -- pretty standard algorithm stuff