title: Pseudocode to compare two trees
body: <p>This is a problem I've encountered a few times, and haven't been convinced that I've used the most efficient logic.</p>
  
  <p>As an example, presume I have two trees:  one is a folder structure, the other is an in-memory 'model' of that folder structure.  I wish to compare the two trees, and produce a list of nodes that are present in one tree and not the other - and vice versa.</p>
  
  <p>Is there an accepted algorithm to handle this?</p>