Cruise Interview Question

Simple data structure, programming question.