[1] Write a function random_list(range_max, size) that returns a list of size random numbers in range(1, range_max). Fo
Posted: Thu Jul 14, 2022 2:17 pm
[1] Write a function random_list(range_max, size)that returns a list of size random numbers in range(1,range_max). For this assignment, (a) do not sort the random listupfront, and (b) do allow duplicates
[2] After generating the random list, you will need tomake a copy of it for each algorithm. Otherwise, once you sort itfor one algorithm, it is already sorted! For how to copy an array,see https://docs.python.org/3/library/copy.html
[3] Write or call a function that will confirm that thelist has been sorted. If it detects an error, make sure to print itvery conspicuously (or throw an exception) so that the error can beresearched.
[2] After generating the random list, you will need tomake a copy of it for each algorithm. Otherwise, once you sort itfor one algorithm, it is already sorted! For how to copy an array,see https://docs.python.org/3/library/copy.html
[3] Write or call a function that will confirm that thelist has been sorted. If it detects an error, make sure to print itvery conspicuously (or throw an exception) so that the error can beresearched.