Segment tree

A Segment Tree is a data structure that allows answering range queries over an array effectively, while still being flexible enough to allow modifying the array. This includes finding the sum of consecutive array element, or finding the minimum element in a such a range in O(logn) time. - Segment Tree / HN

Written on October 3, 2020, Last update on October 3, 2020
tree algorithm