Problem 2875 · Medium

Minimum Size Subarray in Infinite Array

Remove whole copies of the array from the target, then find the shortest window with the leftover sum in two copies.

Open the interactive visualisation