input: Write a function to sort a list of numbers in O(n) time complexity. The function should modify the input list in place and return the sorted list. 
  
  
  def sort_list(unsorted_list):
      unsorted_list.sort()
      return unsorted_list
  
  
  assert sort_list([2, 6, 3, 8, 4]) == [2, 3, 4, 6, 8]
  assert sort_list([9, 1, 5, 7, 3]) == [1, 3, 5, 7, 9]
  assert sort_list([]) == []
  assert sort_list([1]) == [1]
  assert sort_list([1, 2, 3, 4, 5]) == [1, 2, 3, 4, 5]
output: def sort_list(unsorted_list):
      if not unsorted_list:
          return unsorted_list
      min_val = min(unsorted_list)
      max_val = max(unsorted_list)
      count = [0] * (max_val - min_val + 1)
      for num in unsorted_list:
          count[num - min_val] += 1
      index = 0
      for i in range(len(count)):
          while count[i] > 0:
              unsorted_list[index] = i + min_val
              index += 1
              count[i] -= 1
      return unsorted_list