|
@@ -63,27 +63,27 @@ for i in range(veces):
|
63
|
63
|
quicklista=list(mergelista)
|
64
|
64
|
searchlista=list(mergelista)
|
65
|
65
|
|
66
|
|
- t1 = time.clock()
|
67
|
|
- mergeSort(mergelista)
|
68
|
|
- acumulaMerge+=time.clock()-t1
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
69
|
69
|
|
70
|
|
- t1 = time.clock()
|
71
|
|
- heapSort(heaplista)
|
72
|
|
- acumulaHeap+=time.clock()-t1
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
73
|
73
|
|
74
|
|
- t1 = time.clock()
|
75
|
|
- quickSort(quicklista)
|
76
|
|
- acumulaQuick+=time.clock()-t1
|
|
74
|
+ t1 = time.time()
|
|
75
|
+ quickSort(quicklista, 0, len(quicklista) - 1)
|
|
76
|
+ acumulaQuick+=time.time()-t1
|
77
|
77
|
|
78
|
|
- t1 = time.clock()
|
79
|
|
- shellSort(searchlista)
|
80
|
|
- acumulaShell+=time.clock()-t1
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
81
|
81
|
|
82
|
82
|
|
83
|
|
-print "Promedio de tiempo de ejecucion de "+ str(veces) +" listas de largo " + str(largoLista)
|
84
|
|
-print "MergeSort " + str(acumulaMerge/veces) + " segundos"
|
85
|
|
-print "HeapSort " + str(acumulaHeap/veces) + " segundos"
|
86
|
|
-print "QuickSort " + str(acumulaQuick/veces) + " segundos"
|
87
|
|
-print "ShellSort " + str(acumulaShell/veces) + " segundos"
|
|
83
|
+print("Promedio de tiempo de ejecucion de "+ str(veces) +" listas de largo " + str(largoLista))
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+print("QuickSort " + str(acumulaQuick/veces) + " segundos")
|
|
87
|
+
|
88
|
88
|
|
89
|
89
|
|