title: counting sort - negative integers
body: <p>I'm trying to do a counting_sort on negative numbers, the following code only seems to work on positive integers. Any pointers on how I can fix it to work on negative numbers? </p>
  
  <pre><code>def count_sort(l):
     output = [0] * len(l)
     low = min(l)
     if low &gt;= 0:
        low = 0
     high = max(l)
     working = [0 for i in range(low, high+1)]
     for i in l:
        workng[i] += 1
     for j in range(1, len(working)):
        working[j] += working[j-1]
     for k in reversed(ul):
        output[working[k] - 1] = k
        working[k] -= 1
     return output 
  </code></pre>