Added min-heap implementation