title: Fastest Array Comparison
body: <p>I have two sorted arrays (can be ArrayLists, Collections, or any other data format) of unique values. What is the fastest way to compare them? The goal is to remove all values that are present on both lists.</p>
  
  <p>Start with:</p>
  
  <pre><code>int [] a = {1, 2, 3, 4, 5};
  int [] b = {1, 2, 3, 6, 7};
  </code></pre>
  
  <p>End with:</p>
  
  <pre><code>a = {4, 5}
  b = {6, 7}
  </code></pre>