Find longest subarray of 1s after flipping at most zeros. Classic two-pointer / sliding window. Not directly monotonic queue, but related.
The window expands right, contracts left when zeros exceed . Connection: monotonic queue generalizes sliding window for min/max queries. Here we track zero count, not min/max. The principle is the same: maintain a valid window by removing expired or invalid elements from the left.