Implement size/weight balanced tree for dynamic array.
lygstate opened this issue · 9 comments
The array should be able to do the following operations:
Access the i-th element.
Insert element at potion i
Remove element from postion i.
All the operations should be strict O(logN);
We have a couple of balanced tree, do you want to build an abstraction on top of any of them?
@mgechev I've seen that, red-black-tree & avl-tree. But size-balanced tree won't cost extra space.
Okay, lets keep the issue open for now. Unfortunately, I won't be able to start working on weight/size-balanced tree next a couple of weeks.
@mgechev It's OK, cause I am working on it
https://en.wikipedia.org/wiki/Weight-balanced_tree
@mgechev http://web.stanford.edu/~cqf/SBT.zip
I am not so sure if this algorithm is proof-OK.
Sounds awesome! We're looking forward for it!
I've never used a WBT - interested in seeing your implementation. 👍
Am I blind? I don't see it.
But if you did we should probably close this.