Amazon Interview Question

problem soliving questions about arrays and stuff