We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Interval Selection
Interval Selection
+ 1 comment can somebody please explain the problem more clearly. I am not able to get it .
+ 1 comment In the sample test case, it says [1,10] [1,3] and [3,6] overlap on point 3. This is incorrect, right? Should the answer not be 4?
+ 0 comments this can be solved in O(nlogn) with greedy algo. Sort all the end points, then iterate through all the end points using a simple array of size 2 to keep track of the intervals that are still open(haven't met their closing point yet). Whenever the opening intervals reached 3, just remove the interval that spans the furtherst.
+ 0 comments I understand the question after a good 15 minutes of reading. Not Google interview worthy problem solving skills yet, but I'm proud of myself for getting this far.
+ 0 comments yes plz any one explain me problem statment
Load more conversations
Sort 32 Discussions, By:
Please Login in order to post a comment