Concepts3
∑MathIntermediate
Probability Fundamentals
Probability quantifies uncertainty by assigning numbers between 0 and 1 to events in a sample space.
#probability#sample space#conditional probability+12
⚙️AlgorithmIntermediate
Prefix Sum and Difference Array
Prefix sums precompute running totals so any range sum [l, r] can be answered in O(1) time as prefix[r] - prefix[l-1].
#prefix sum#difference array#imos method+12
🗂️Data StructureIntermediate
2D Fenwick Tree
A 2D Fenwick Tree (Binary Indexed Tree) supports point updates and rectangle sum queries in O(log n × log m) time.
#2d fenwick tree#binary indexed tree 2d#bit 2d+12