|
@@ -37,21 +37,25 @@ acumulaShell=0 #variable para acumular el tiempo de ejecucion del shellsort
|
37
|
37
|
|
38
|
38
|
for i in range(veces):
|
39
|
39
|
lista = [randint(0,maxValor) for r in range(largoLista)]
|
|
40
|
+ listaMerge = lista[:]
|
|
41
|
+ listaHeap = lista[:]
|
|
42
|
+ listaQuick = lista[:]
|
|
43
|
+ listaShell = lista[:]
|
40
|
44
|
|
41
|
45
|
t1 = time.clock()
|
42
|
|
- mergeSort(lista)
|
|
46
|
+ mergeSort(listaMerge)
|
43
|
47
|
acumulaMerge+=time.clock()-t1
|
44
|
48
|
|
45
|
49
|
t1 = time.clock()
|
46
|
|
- heapSort(lista)
|
|
50
|
+ heapSort(listaHeap)
|
47
|
51
|
acumulaHeap+=time.clock()-t1
|
48
|
52
|
|
49
|
53
|
t1 = time.clock()
|
50
|
|
- quickSort(lista)
|
|
54
|
+ quickSort(listaQuick)
|
51
|
55
|
acumulaQuick+=time.clock()-t1
|
52
|
56
|
|
53
|
57
|
t1 = time.clock()
|
54
|
|
- shellSort(lista)
|
|
58
|
+ shellSort(listaShell)
|
55
|
59
|
acumulaShell+=time.clock()-t1
|
56
|
60
|
|
57
|
61
|
|