input: Write a function to sort a given list of numbers in O(n) time complexity. If the list is empty, return an empty list.
  def sort_list(unsorted_list):
      if not unsorted_list:
          return []
      count = [0] * (max(unsorted_list) + 1)
      for num in unsorted_list:
          count[num] += 1
      sorted_list = []
      for i in range(len(count)):
          sorted_list.extend([i] * count[i])
      return sorted_list
  assert sort_list([2, 6, 3, 8, 4])==[2, 3, 4, 6, 8]
  assert sort_list([])==[]
output: def sort_list(unsorted_list):
      if not unsorted_list:
          return []
      count = [0] * (max(unsorted_list) + 1)
      for num in unsorted_list:
          count[num] += 1
      sorted_list = []
      for i in range(len(count)):
          sorted_list.extend([i] * count[i])
      return sorted_list