Must use the sorted list, otherwise, the results are not predictable