Code:
class PriorityQueue_MaxHeap:
def init(self):
self.heap = []
def insert(self, timestamp, priority):
heap = self.heap
heap.append((timestamp, priority))
self._heapify_up(len(self.heap) - 1)
Error:
heap = self.heap
^^^^^^^^^
AttributeError: ‘PriorityQueue_MaxHeap’ object has no attribute ‘heap’
Can You Help Me Please To Solve This Issue
🙂
the indentation is fine.
New contributor
amin fvrvhvni is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.