Amazon interview question

pretty vague, somewhat leetcode but not really