Navan Interview Question

Asked to code a simple sliding window problem