input: def sort_list(unsorted_list):
      """
      Optimize the given Python code to sort a set of numbers in O(n) time complexity.
      >>> sort_list([2, 6, 3, 8, 4])
      [2, 3, 4, 6, 8]
      """
output:     
      max_num = max(unsorted_list)
      count = [0] * (max_num + 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
  