Top "Segment-tree" questions

A segment tree is a heap-like data structure that can be used for making update/query operations upon array intervals in logarithmical time.

What are the differences between segment trees, interval trees, binary indexed trees and range trees?

What are differences between segment trees, interval trees, binary indexed trees and range trees in terms of: Key idea/definition …

algorithm tree graph-algorithm interval-tree segment-tree
Segment tree java implementation

Do you know a good implementation of a (binary) segment tree in Java?

java algorithm segment-tree
How is the memory of the array of segment tree 2 * 2 ^(ceil(log(n))) - 1?

The link: http://www.geeksforgeeks.org/segment-tree-set-1-sum-of-given-range/. This is the quoted text: We start with a segment arr[0 . . . n-1]. …

arrays memory data-structures tree segment-tree
Lazy propagation in segment tree?

Well, I was trying to solve this Flipping coins problem on Codechef. Am solving it with segment trees. But getting …

algorithm segment-tree lazy-propagation
Segment tree implementation in Python

I am solving this problem using segment tree but I get time limit error. Below is my raw code for …

python algorithm segment-tree
Is it possible to query number of distinct integers in a range in O(lg N)?

I have read through some tutorials about two common data structure which can achieve range update and query in O(…

algorithm data-structures segment-tree fenwick-tree