implement build heap, min heapify and a verifier