You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*[Segment Tree](https://github.com/trekhleb/javascript-algorithms/tree/master/src/data-structures/tree/segment-tree) - with min/max/sum range queries examples
A simple data structure that supports fast range queries in an array. However, it is usually only valid for reversible operations, like addition and subtraction
3
+
A simple data structure that supports fast range queries
4
+
in an array. However, it is usually only valid for reversible
5
+
operations, like addition and subtraction
4
6
5
-
This implementation uses the basic range sum query and point update. All the indexes are 1-based
7
+
Binary Indexed Tree is represented as an array. Each node of Binary Indexed Tree
8
+
stores sum of some elements of given array. Size of Binary Indexed Tree is equal
9
+
to `n` where `n` is size of input array. In current implementation we have used
10
+
size as `n+1` for ease of implementation. All the indexes are 1-based.
0 commit comments