- #1
evinda
Gold Member
MHB
- 3,836
- 0
Hello! (Wave)
I want to write an algorithm that takes as input an AVL-tree and gives as output two AVL-trees, that contain together all the keys of the initial tree and in addition the keys of the one are greater than the keys of the other AVL-tree.
The algorithm's time complexity should be $O(\log n)$ where $n$ is the number of nodes of the initial AVL-tree.Could you give me a hint how we could do this? (Thinking)
I want to write an algorithm that takes as input an AVL-tree and gives as output two AVL-trees, that contain together all the keys of the initial tree and in addition the keys of the one are greater than the keys of the other AVL-tree.
The algorithm's time complexity should be $O(\log n)$ where $n$ is the number of nodes of the initial AVL-tree.Could you give me a hint how we could do this? (Thinking)