Amazon interview question

Introduction and given assessment to do