dsa1 min read
Minimum Swaps to Group All 1s Together II [Medium] — Fixed Window
Find minimum swaps to group all 1s together in a circular binary array using a fixed-size sliding window equal to the count of 1s.
Read →
1575 articles
Find minimum swaps to group all 1s together in a circular binary array using a fixed-size sliding window equal to the count of 1s.
Find minimum minutes to collect at least k of each character from ends by finding the longest middle window that can be excluded.
Maximize customer satisfaction by finding the best k-minute window for the bookstore owner to stay non-grumpy.
Find the minimum difference between the max and min of any k scores by sorting and using a fixed window of size k.
Find the maximum length substring you can transform from s to t within a given cost budget using a sliding window on character change costs.