linked list, heap, merge