Browse Source

Made indentation corrections in sorting.py

luislopez66 2 years ago
parent
commit
89f2664aac
1 changed files with 7 additions and 11 deletions
  1. 7
    11
      sorting.py

+ 7
- 11
sorting.py View File

24
 def mergeSort(lista, l, r):
24
 def mergeSort(lista, l, r):
25
 	if l < r:
25
 	if l < r:
26
 
26
 
27
-		# Same as (l+r)//2, but avoids overflow for
28
-		# large l and h
29
-		m = l+(r-l)//2
27
+	# Same as (l+r)//2, but avoids overflow for
28
+	# large l and h
29
+	m = l+(r-l)//2
30
 
30
 
31
-		# Sort first and second halves
32
-		mergeSort(lista, l, m)
33
-		mergeSort(lista, m+1, r)
34
-		merge(lista, l, m, r)
31
+	# Sort first and second halves
32
+	mergeSort(lista, l, m)
33
+	mergeSort(lista, m+1, r)
34
+	merge(lista, l, m, r)
35
 
35
 
36
 def heapSort(lista):
36
 def heapSort(lista):
37
 
37
 
95
 print ("HeapSort " + str(acumulaHeap/veces) + " segundos")
95
 print ("HeapSort " + str(acumulaHeap/veces) + " segundos")
96
 print ("QuickSort " + str(acumulaQuick/veces) + " segundos")
96
 print ("QuickSort " + str(acumulaQuick/veces) + " segundos")
97
 print ("ShellSort " + str(acumulaShell/veces) + " segundos")
97
 print ("ShellSort " + str(acumulaShell/veces) + " segundos")
98
-<<<<<<< HEAD
99
-
100
-=======
101
->>>>>>> a2416a1f1584bddc699e3c6dfe5efdd25f2ac172