Timeline for Data structure for sorting by multiple attributes
Current License: CC BY-SA 3.0
4 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Dec 8, 2015 at 12:03 | vote | accept | Adrian Buzea | ||
| Dec 8, 2015 at 12:01 | comment | added | Mike Nakis |
Considering the nature of the problem, I think O(2 log n) is about the best you could hope for. And it is not really inefficient. You are still sub-O(n). You should not be complaining!
|
|
| Dec 8, 2015 at 11:57 | comment | added | Adrian Buzea | That is basically what I had in mind. I need to somehow store information about locating a pair on the other heap so I can make changes to it. It just seems a little inefficient to basically do two heap removals and two heap insertions, each of them O(logn), for each item. | |
| Dec 8, 2015 at 11:50 | history | answered | Mike Nakis | CC BY-SA 3.0 |