title: Trouble implementing a counting sort algorithm
body: <p>I'm trying to teach myself a few sorting algorithms in python and I'm having a little bit of trouble with the output.  I'm attempting to implement a counting sort algorithm and I've gotten this far:</p>
  
  <pre><code>def counting_sort(l):
      nums = l
      highest = max(nums) + 1
      helper_list = [0] * highest
      s_list = []
      for i in range(len(nums)):
          value = nums[i]
          helper_list[value] += 1
  
      for j in range(len(helper_list)):
          s_list.append([j] * helper_list[j])
  
      return s_list
  </code></pre>
  
  <p>Everything is going <em>almost</em> fine, but when I give an input such as <code>[5, 2, 2, 3, 1, 2]</code>.</p>
  
  <p>I get an output like: <code>[[], [1], [2, 2, 2], [3], [5]]</code>. </p>