R – ny map data structure that allows fast merging

big obinary treedata structuresmerge

Are there any map data structures that have at least O(log n) insertion, deletion, access, and merging?

Most self-balancing binary trees such as AVL trees and red-black trees have most of these properties, but I believe they have O(n log n) merging. Are there any data structures that have faster merging?

Edit: I have looked around, and I can't find anything like this. If there is no such data structure, I would love some insight into why this is not possible.

Best Answer

I'd take a look at splay trees. You'll probably end up paying the merging cost along the way, but you should be able to inject another tree in and put the cost off until later.