I want to graph the execution time of my algorithm in python, I've been trying with graph, but it doesn't work, any recommendation? this is my algorithm:
def countingSort(lista, maximo):
maximo += 1
conteo = [0] * maximo
for n in lista:
conteo[n] += 1
aux = 0
for j in range(maximo):
for k in range(conteo[j]):
lista[aux] = j
aux += 1
return lista
lista = [3, 7, 4, 1, 1, 1, 3, 1, 2, 7, 2, 4, 2, 6, 6, 5]
print("input: ",lista)
lista = countingSort(lista, max(lista))
print("output: ",lista)
input: [3, 7, 4, 1, 1, 1, 3, 1, 2, 7, 2, 4, 2, 6, 6, 5]
output: [1, 1, 1, 1, 2, 2, 2, 3, 3, 4, 4, 5, 6, 6, 7, 7]