merges and heaps 1036486