black_friday/Assets/Scripts/PriorityQueue.cs
/// <summary>
/// Deuqueues the first element in the priority queue
/// </summary>
/// <returns>The first element</returns>
Deuqueues the first element in the priority queue
Deuqueues the first element in the priority queue
public T Dequeue()
        {
            T dequeuedValue = innerHeap[0];
            SwapFromIndices(0, innerHeap.Count - 1);
            innerHeap.RemoveAt(innerHeap.Count - 1);
            HeapSort();
            return dequeuedValue;
        }
public T Dequeue ( ) { T dequeuedValue = innerHeap [ 0 ] ; SwapFromIndices ( 0 , innerHeap . Count - 1 ) ; innerHeap . RemoveAt ( innerHeap . Count - 1 ) ; HeapSort ( ) ; return dequeuedValue ; }
Deuqueues the first element in the priority queue
Deuqueues the first element in the priority queue
//Replace the root with the last element in the heap, then remove the root //Re-sort the heap now that it has changed
The first element
The first element