Question about segment trees

Revision en1, by idek_bro, 2022-07-29 20:59:52

Does a segment tree provide any functionality other than storing the sums of sub arrays? Is the usage of unordered_sets to store the sums of subarrays from [0,0] to [0,n], to calculate the sum of the subarray [l,r] as [0,r]-[0,l-1] a valid alternative to segment trees?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English idek_bro 2022-07-29 20:59:52 298 Initial revision (published)