Problems for practicals: AVL trees
Požadavky na absolvování
- Adjust AVL trees so for a given k they can effectively find k-th smallest element of the set. If you add some information to nodes do not forget to update them during rotations
- Modify representation of AVL tees so you can use only one bit of information per vertex to represent the balancing info. Sign of a vertex must be computable in a constant time.
- We use AVL tree to represent a dictionary that assigns values to keys. Modify the datastructure so it can effectively find maximal value assigned to a key in a given interval [a,b].
- In the setup above implement effectively also operation to increase value of all keys in a given interval [a,b] by some value d.
Naposledy změněno: středa, 8. dubna 2020, 15.07