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
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.
git
git diff