4 ms·
I'm not sure what you mean by the pyramid-shaped configuration. In any case, n queries taking log(n) + n time each is O(n log n). I think you're right that a ra
by michaelmior 12y ago
I'm not sure what you mean by the pyramid-shaped configuration. In any case, n queries taking log(n) + n time each is O(n log n). I think you're right that a range tree should work fine.
- brianpgordon 12y agoI mean this thing from the article: https://briangordon.github.io/images/worstcase.svg https://briangordon.github.io/images/worstcase.svg > n queries taking log(n) + n time each is O(n log n) No, it's O(n^2).
- michaelmior 12y agoWow, clearly commenting too late. Of course you're right :)