Ver código fonte

Updated heap.py

luislopez66 2 anos atrás
pai
commit
05bfd2be7e
1 arquivos alterados com 3 adições e 3 exclusões
  1. 3
    3
      heap.py

+ 3
- 3
heap.py Ver arquivo

@@ -10,14 +10,14 @@
10 10
 # i. Also, n is the size of a heap and arr is array.
11 11
 
12 12
 def heapify(lista, n, i):
13
-		# largest is root for now
13
+        # largest is root for now
14 14
 		largest = i
15 15
 
16 16
 		# left child of root
17
-		left = 2 * i + 1
17
+		l = 2 * i + 1
18 18
 
19 19
 		# right child of root
20
-		right = 2 * i + 2
20
+		r = 2 * i + 2
21 21
 
22 22
 		# Checks if root has a left child and is greater
23 23
 		# than root