generic algorithm:
    push_heap
    sort_heap
    make_heap
    unique_copy
    upper_bound
    transform
    swap_range