stable

tech2026-06-17  18

带有stable的函数可保证相等元素的原本相对次序在排序后保持不变。

(stable_sort内部实现是归并排序,稳定,sort是快速排序,不稳定)

在刷oj时碰到的,蛮有意思的一个点,需要记住!

最新回复(0)