Constructs a structure for efficient cumulative frequency or sum queries and updates on an array.
Explain code with DocComment! Try out your own code!