(self,data)
| 66 | self.currsize = size |
| 67 | |
| 68 | def insert(self,data): #This function is used to insert data in the heap. |
| 69 | self.h.append(data) |
| 70 | curr = self.currsize |
| 71 | self.currsize+=1 |
| 72 | while self.h[curr] > self.h[curr/2]: |
| 73 | temp = self.h[curr/2] |
| 74 | self.h[curr/2] = self.h[curr] |
| 75 | self.h[curr] = temp |
| 76 | curr = curr/2 |
| 77 | |
| 78 | def display(self): #This function is used to print the heap. |
| 79 | print(self.h) |
nothing calls this directly
no outgoing calls
no test coverage detected