Amazon Interview Question

pretty vague, somewhat leetcode but not really