Added build heap and minheap