Cruise interview question

Standard algorithmic questions