Monotonic queue works online: process elements left to right, answer queries as they arrive. Some problems allow offline: collect all queries, sort cleverly, answer in better order.
Example: if queries come with variable values, sort queries by , adjust window sizes as needed. Online requires per query. Offline might allow total with careful ordering. Online algorithms process elements one at a time with no future knowledge. Offline can reorder for efficiency.