The problem is just solved. I've done it on my own. Key here was a priority queue having maximum k elements and binary search by ranks of intervals.
Complexity O(n*logn)
CodeGuru Home | VC++ / MFC / C++ | .NET / C# | Visual Basic | VB Forums | Developer.com |
Search:Type: Posts; User: Vaxler Search: Search took 0.01 seconds.
Results 1 to 3 of 3
|
Click Here to Expand Forum to Full Width |