Write a function that takes a list of integers and returns True if there are any duplicate values in the list. Use sorting to accomplish this task. Do not modify the original list.
Write a function with the same behavior, using a set to accomplish the task.
Which implementation do you think will be faster on a large list? As an experiment, allocate a list of 5,000,000 unique integers in the range from 1 to 1,000,000,000, then call both of the above functions on your list. Each function should return False. How does the exection time compare?