Fixed time check and added getN method to maxHeap