I have created the project my self but it is a long time ago which i have worked with c++. I have received the three files and i have the created the PriorityQueue.h myself but there are some bugs in PriorityQueue.h, i appreciate if you could fix my implementations too. The time complexity must be O(logn) or O(logn^2) and i appreciate if you could explain your solutions via comments in every member functions and member variables.
You must implement the abstract data type (ADT) priority queue, where the element with the lowest value is the highest priority, which implements the following API:
• void enqueue(T element); - Adds an element to the priority queue.
• void dequeue(); - Removes the highest priority element from the priority queIue.
• T peek(); - Gets the highest priority element of your priority queue.
• size_t size(); - Returns the number of elements that are in the priority queue.
• bool isEmpty(); - Shows whether or not your priority is empty.
You should assume that the smaller than operator (operator <) is implemented for all types of data used in connection with priority.