Amazon Interview Question

They asked two sum , rotten oranges.