Problems > Count Small-Magnitude in Range > Editorial

Count Small-Magnitude in Range — Solution & Editorial

Back to the Problem

Prefix counts of the predicate answer each query in O(1).

Complexity: O(N + Q)