/fenwick-tree

Fenwick tree implementation

Primary LanguageC++GNU Lesser General Public License v2.1LGPL-2.1

Fenwick tree

Implementation of a Fenwick tree as described by Peter M. Fenwick. It will pass Kattis.

How-to

For running tests you will need Google C++ Mocking Framework. Build with SCons from root directory.

$ scons
$ cd bin
$ ./run_all_tests

You can also run the Kattis test cases.

$ cat kattis/fenwick1.in | ./fenwick

References

Peter M. Fenwick. "A new data structure for cumulative frequency tables". Software: Practice and Experiences 24 (3): 327-336, 1994.