heap implementation using array or vector. Min heap - max heap