Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Check out interval trees.

Example use case: https://chrlschn.dev/blog/2022/11/concurrent-processing-dotn...

    Queries require O(log n + m) time, with n being the total number of intervals and m being the number of reported results. Construction requires O(n log n) time, and storage requires O(n) space.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: