2 Коммиты

Автор SHA1 Сообщение Дата
  Carlos Hernandez 90f63ff8ef Remover anotación de tipos para compatibilidad 2 лет назад
  Carlos Hernandez ba0840430f Remover anotación de tipos para compatibilidad 2 лет назад
1 измененных файлов: 2 добавлений и 2 удалений
  1. 2
    2
      sorting.py

+ 2
- 2
sorting.py Просмотреть файл

@@ -19,7 +19,7 @@ def heapSort(lista):
19 19
 	Carlos Hernández
20 20
 	Implementación de heapSort.
21 21
 	"""
22
-	def max_heapify(lista, idx: int, heap_size: int):
22
+	def max_heapify(lista, idx, heap_size):
23 23
 		"""Convertir el nodo `idx` y sus descendientes en un max heap."""
24 24
 		left_idx = 2 * idx + 1
25 25
 		right_idx = 2 * idx + 2
@@ -37,7 +37,7 @@ def heapSort(lista):
37 37
 		for idx in range((heap_size - 1) // 2, -1, -1):
38 38
 			max_heapify(lista, idx, heap_size)
39 39
 
40
-	heap_size: int = len(lista)
40
+	heap_size = len(lista)
41 41
 	build_max_heap(lista, heap_size)
42 42
 	for idx in range(len(lista) - 1, 0, -1):
43 43
 		lista[0], lista[idx] = lista[idx], lista[0]