代码题:
Question 1 — Maximize Shipment Order
You're working in Amazon's logistics optimization team, where shipments are processed in order before dispatch.
You are given an integer
windowSize
复制代码
and an array
shipmentOrder
复制代码
of length
n
复制代码
, which is a permutation containing each integer from 1 to n exactly once.
You are allowed to perform the following operation exactly once: