End work with merge algorithms and start with heap.