Algorithms_in_C++ 1.0.0
Set of algorithms implemented in C++.
|
A data structure to quickly do operations on ranges: the Segment Tree algorithm implementation. More...
#include <iostream>
#include <vector>
#include <algorithm>
#include <cassert>
Classes | |
class | data_structures::SegmentTree< T > |
class representation of the segment tree More... | |
Namespaces | |
namespace | data_structures |
for IO operations | |
Functions | |
static void | test () |
Self-test implementations. | |
int | main () |
Main function. | |
A data structure to quickly do operations on ranges: the Segment Tree algorithm implementation.
Implementation of the segment tree data structre
Can do point updates (updates the value of some position) and range queries, where it gives the value of some associative opperation done on a range
Both of these operations take O(log N) time
int main | ( | void | ) |
|
static |
Self-test implementations.