kingofnumbers's blog

By kingofnumbers, 12 years ago, In English

Hi,

I want to know how to merge two AVL trees where elements of the first tree is smaller than all elements of second AVL tree how can I do that in O(log N) of course preserving the balance factor .

aslo how to split one AVL tree into two AVL trees where elements of the first is less than or equal K and elements of the second AVL tree is bigger than K also with preserving the balance factor.

thanks for helping me.

  • Vote: I like it
  • +6
  • Vote: I do not like it

»
8 years ago, # |
Rev. 2   Vote: I like it -11 Vote: I do not like it

Good question. I will learn it and give a solution.