Fidelity Investments Interview Question

Rotten Oranges and Question based on Sliding Window