CSES - Sorting algorithms

The course material includes implementations of insertion sort and merge sort in Python. Your task is to study their operation and efficiency experimentally.

Measure the running time of each algorithm when n=10^5 and the input consists of the numbers 1,2,\dots,n in random order. Verify that the list is in sorted order after the execution of the algorithm, but do not include the verification time in the measurement.

In addition, measure the running time of the Python built-in method sort for the same input.

In this task, you get a point automatically when you fill in your results and the code you used, and press the submit button.

Running time of insertion sort: s

Running time of merge sort: s

Running time of the Python method sort: s

The code you used in the test: