Implement Prototype(loads []int,width int) ([]int,error) by scanning windows; Solve uses a monotonic deque of indices, O(n) time and O(width) auxiliary space. Return maxima for full windows in starting order. Empty input or width above length yields empty slice. Width <= 0 returns error even on empty input. Signed values and ties are valid. Preserve input.

Edit exercise.go; retain the public types and signatures. prototype and final are separate stages. The executable tests recover panics as failures, report named checks, and exit nonzero on any failure. A successful run must execute at least one check. Tests use logical time or explicit synchronization where relevant.

Drag or use the arrow keys to resize. Home collapses the question; End collapses the editor. Enter or double-click resets the split.
Loading editor…
No results yet.

Complete the starter code, then run the checks.
Results and errors will appear here.