Fixed example 1 - using numpy.sort(x) with x being the array to sort
Fixed example 2 - we need a copy of the list and not a reference, so the values[:] notations slices values and returns a new list with all its entries. Also, we want the difference to be a positive number