Aurora Innovation interview question

Data structure question, had to be solved in python.