Amazon interview question

mainly just leetcode style live coding