Change the following functions so that `sort` sorts the given list inplace.