Skip to content

Commit 840aa62

Browse files
author
Yasser A
committed
fix division by float issue in range heap.py
1 parent 8a667e8 commit 840aa62

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

data_structures/heap/heap.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def maxHeapify(self,node):
4040
def buildHeap(self,a):
4141
self.currsize = len(a)
4242
self.h = list(a)
43-
for i in range(self.currsize/2,-1,-1):
43+
for i in range(self.currsize//2,-1,-1):
4444
self.maxHeapify(i)
4545

4646
def getMax(self):

0 commit comments

Comments
 (0)