Starbucks interview question

Basic concepts