Pseudocode to compare two trees

后端 未结 5 1980
猫巷女王i
猫巷女王i 2021-02-02 11:11

This is a problem I\'ve encountered a few times, and haven\'t been convinced that I\'ve used the most efficient logic.

As an example, presume I have two trees: one is a

5条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-02 11:39

    You may also want to have a look at how git does it. Essentially whenever you do a git diff, under the hood a tree comparison is done.

提交回复
热议问题