Dollar Tree interview question

Basic