A prefix sum array answers range sum queries in O(1), but every update forces an O(n) rebuild. A Segment Tree handles both range queries and point updates in O(log n), and works for sums, minimums or maximums. Use it when the data changes between many range queries, like live scores in a leaderboard. If the array never changes, prefix sums are much simpler.