Range Sum Query - Mutable

Solution Code

Time Complexity

O(log N) per update and query

Space Complexity

O(N) to store the tree