max_heap build