title: Sort repeating numbers numerically
body: <p>Given a list of values, like the following:</p>
  
  <pre><code>n = [0, 0, 1, 2, 2, 3]
  </code></pre>
  
  <p>What is the fastest way to sort such list as:</p>
  
  <pre><code>y = [0, 1, 2, 3, 0, 2]
  </code></pre>
  
  <p>In other words, I would like the values grouped so that the first occurrences of the values appear first, the second appearances second, and so on, with the numbers sorted by value within the groups. </p>