Count of Smaller Numbers After Self — Segment Tree / Fenwick

For each entry in a waiting line of price shifts, count how many later entries are lower than it, ignoring ties, in line order.

Segment Tree / Fenwick · Hard

More in Segment Tree / Fenwick

All algorithm problems