def rebuild_max_heap(self): build_max_heap(self)
def insert(self,index,object): #that one is not efficient better dont use it use #the insert_to_heap method instead of that :) super(MaxHeap,self).insert(index,object) build_max_heap(self)
def __init__(self,list_ob=None): build_max_heap(list_ob) super(MaxHeap,self).__init__(list_ob) self.heap_size = len(list_ob)