priority queue implemented with a classic maxheap array