
Range Count Tree - A simple BST for range counts - shadykiller
http://shadabahmed.com/blog/2013/03/09/rangecounttree-a-binary-search-tree-for-ranges
======
ctoth
<https://en.wikipedia.org/wiki/Segment_tree>

~~~
shadykiller
This looks cool . .my implementation also stores counts .. and is more
optimized for storing counts(intersections) than ranges

Quoting from the wiki page:

If Int(T) is contained in X then store X at T, and finish.

For the same case I split the current node into 3 intervals

