Groups
Category
Level
Probability quantifies uncertainty by assigning numbers between 0 and 1 to events in a sample space.
Prefix sums precompute running totals so any range sum [l, r] can be answered in O(1) time as prefix[r] - prefix[l-1].
A 2D Fenwick Tree (Binary Indexed Tree) supports point updates and rectangle sum queries in O(log n × log m) time.