3 ms·
Range Count Tree - A simple BST for range counts
- ctoth 14y agohttps://en.wikipedia.org/wiki/Segment_tree https://en.wikipedia.org/wiki/Segment_tree
- shadykiller 14y agoThis 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