-
-
Notifications
You must be signed in to change notification settings - Fork 169
Consider to use Order Statistic Tree for RGA Tree List #1626
Description
What would you like to be added:
In yorkie, it implements left-leaned red-black tree and splay tree for BBST.
Especially splay tree, it additionally support index-based search(get node by index, get index by node) with calculating weight, range deletion by re-rooting and cache-efficient search via Splay operation.
However splay tree(nodeMapByIndex) in rga tree list, it seems does not have advantage using splay tree. Splay Tree's time complexity is amortized O(logN) but O(N) in worst case. It uses Find, InsertAfter, Delete. Also Order Statistic Tree can operate all in O(logN).
Because of this, it will be great to implement Order Statistic Tree that can support O(logN) index-based search and InsertAfter. This tree will be simplified tree of index tree, expand llrb implementation and add sub-tree size field in each node.
Why is this needed:
It seems SplayTree in RGATreeList does not have much advantage.
It's same with
Metadata
Metadata
Assignees
Labels
Type
Projects
Status