How i can merge two binary trees

后端 未结 5 929
醉话见心
醉话见心 2020-12-18 03:39

I have two binary trees and I want to merge them. My first question is that whether we can merge two binary trees and if yes how efficiently I can perform the merge operati

5条回答
  •  离开以前
    2020-12-18 03:49

    Not considering efficiency this answer may work Algorithm of combining two binary trees? . If sorted or balanced, discussion on efficiency in How to merge two BST's efficiently? and Concatenating/Merging/Joining two AVL trees

提交回复
热议问题