Partial sort of std::list

后端 未结 2 1299
野性不改
野性不改 2021-01-12 09:19

I have a linked list that I want to sort part of, eg:

std::sort(someIterator, otherIterator, predicate);

std::sort requires random-access i

2条回答
  •  死守一世寂寞
    2021-01-12 10:17

    How about unhooking the part of the list that you want sorted, into a standalone list, then use the specialized list sort, then hook it back into the original list?

提交回复
热议问题