Gorgias (CA) Interview Question

Similar to the maximum sliding window problem on Leetcode