Determine if two binary trees are equal

前端 未结 7 1857
臣服心动
臣服心动 2020-12-04 22:33

What would be the efficient algorithm to find if two given binary trees are equal - in structure and content?

相关标签:
7条回答
  • 2020-12-04 23:16

    A more general term for what you are probably trying to accomplish is graph isomorphism. There are some algorithms to do this on that page.

    0 讨论(0)
提交回复
热议问题