All Posts

1276 articles

dsa1 min read

Count of Range Sum — Merge Sort / BIT

Count subarray sums within [lower, upper]. Use prefix sums and merge sort: during merge count pairs of prefix sums with difference in range.

Read →
Page 86 of 256