Module dsa.sorttools
Module to access functions for sort benchmarking.
Functions
def filled_array(n)
-
return an array filled with integers from 0 to n-1
Args
n
- the number of integers to generate
Returns: array filled with integers from 0 to n-1
def rand_int_array(n: int, maxnum: int) ‑> list
-
return an array of n integers of random numbers from 0 to maxnum
Args
n
- the number of integers to generate
maxnum
- the maximum number in a range (0-maxnum inclusive)
Returns: array of n integers of random numbers from 0 to maxnum
def shuffle_array(n)
-
return a shuffled array filled with integers from 0 to n-1
Args
n
- the number of integers to generate
Returns: array shuffled with integers from 0 to n-1