title: number of moves needed to get closest to a sorted array (increasing)
body: <p>The rules to sort the array are:
  you are allowed to pick either the first or the last element of the array and use it as the first element of the new array, repeat the process and get the new array complete.
  Then repeat process on the new array
  Ex:</p>
  
  <pre><code>Old Line = 5 3 4 3 2 7
  New Line = Empty
  
  Old Line = 3 4 3 2 7
  New Line = 5
  
  Old Line = 3 4 3 2
  New Line = 5 7
  
  Old Line = 4 3 2
  New Line = 3 5 7
  
  Old Line = 3 2
  New Line = 4 3 5 7
  
  Old Line = 2
  New Line = 3 4 3 5 7
  
  Old Line = Empty
  New Line = 2 3 4 3 5 7
  </code></pre>
  
  <p>Here, this is the best we can get to, but we are allowed to use the final new line as old line again to make a more sorted array if possible.</p>