input: Write a function to sort a list of numbers in O(n) time complexity by filling an output list with the minimal element of the input list, and removing that element each time from the input list. If the input list is already sorted, return it as it is.
  
  ### Input:
  unsorted_list = [2, 6, 3, 8, 4]
  
  ### Output:
  def sort_list(unsorted_list):
      sorted_list = []
      while unsorted_list:
          min_elem = min(unsorted_list)
          unsorted_list.remove(min_elem)
          sorted_list.append(min_elem)
      return sorted_list
  
  assert sort_list([2, 6, 3, 8, 4]) == [2, 3, 4, 6, 8]
  assert sort_list([1, 2, 3, 4, 5]) == [1, 2, 3, 4, 5]
  assert sort_list([9, 8, 7, 6, 5]) == [5, 6, 7, 8, 9]
  assert sort_list([]) == []
  assert sort_list([10]) == [10]
output: def sort_list(unsorted_list):
      sorted_list = []
      while unsorted_list:
          min_elem = min(unsorted_list)
          unsorted_list.remove(min_elem)
          sorted_list.append(min_elem)
      return sorted_list