Amazon interview question

Asked me to code and debug code