Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interval Intersection #9

Open
ishu9bansal opened this issue Jul 26, 2020 · 2 comments
Open

Interval Intersection #9

ishu9bansal opened this issue Jul 26, 2020 · 2 comments

Comments

@ishu9bansal
Copy link
Owner

Write an efficient method to insert an interval in a data structure and get all the ranges intersecting with a given range.
The runtime should be proportional to the size of the intersection result.

@ishu9bansal
Copy link
Owner Author

A combination of interval tree and start end timestamp maps should do the trick
Implementation:
https://ideone.com/yUB1Pq

@ishu9bansal
Copy link
Owner Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant