A binary minimum and maximum heap implemented using an array with generic types, which can be used as a priority queue.