In this video, I walk through a full solution to the Sliding Window Minimum problem from the CSES Problem Set. This is a classic problem that requires a smart data structure to avoid brute-force — we need to find the minimum of every window of size k efficiently using a Monotonic Deque.
📌 Problem Summary:
Given an array of n integers and a window of size k, find the minimum element in each sliding window and output the XOR of all those minimums.
The array is generated using a linear congruential generator (LCG) — no direct input
Output is the XOR of all window minimums
Brute force is too slow — we need O(n) solution
🔗 Problem Link: https://cses.fi/problemset/task/3221/