Cruise interview question

Simple data structure, programming question.