title: Algorithm for finding the difference between two arrays
body: <p>Given two arrays, is there a fast algorithm for finding all elements in the two that are different? For example, consider two arrays of Keys (as in keyboard keys) structs. One represents the currently depressed keys, and the other represents the keys depressed in the last timestep.</p>
  
  <pre><code>Keys[] oldKeys = LastKeyboardState.GetPressedKeys();
  Keys[] currKeys = CurrentKeyboardState.GetPressedKeys();
  
  // the user just pressed these key(s) during the last timestep.
  Keys[] diff = ...
  </code></pre>
  
  <p>Suggestions are much appreciated!</p>