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

15.3 Insert Interval Time Limit Exceeded #53

Open
ByzanTine opened this issue Feb 17, 2015 · 1 comment
Open

15.3 Insert Interval Time Limit Exceeded #53

ByzanTine opened this issue Feb 17, 2015 · 1 comment

Comments

@ByzanTine
Copy link

Hi, I gotta to run your solution on github.
However, I got a TLE when submit to online judge.
The corresponding testcase is something like
[[1,2],[3,4],[5,6],[7,8],[9,10],[11,12],[13,14],[15,16],[17,18] ... [19999,20000]], [0,20001]]
It cause multiple erase which make your algorithm in worst case O(n^2).
A O(n) time, O(n) space solution that use extra memory to save the result can basically pass the oj.

@ByzanTine
Copy link
Author

Just found out dupe with #51, sorry about that.

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