title: Find the Longest Subarray
body: <p>Given an array of integers, what is the length of the longest subarray containing no more than two distinct values such that the distinct values differ by no more than 1?</p>
  
  <p>Example:</p>
  
  <pre><code>arr = [0,1,2,1,2,3]
  </code></pre>
  
  <p>The largest such subarray has length 4: [1,2,1,2].</p>
  
  <pre><code>arr = [1, 1, 1, 3, 3, 2, 2]
  </code></pre>
  
  <p>The largest such subarray has length 4: [3, 3, 2, 2].
  The values 1 and 3 differ by more than 1 so [1, 1, 1, 3, 3] is not valid.</p>