Sorting algorithm - Wikipedia
10
公开标注数
6
参与人数
2026-07-18 10:10:17
首次 Whisper
本页的公开 Whisper
划选高亮2026-08-11 18:38:48
原文高亮摘录
“a comparison sort cannot perform better than O(n log n) on average”
Whisper 随想笔记
So that's why my custom sort is always slower than the built-in.
划选高亮2026-08-11 12:32:48
原文高亮摘录
“the output of any sorting algorithm must satisfy two conditions”
Whisper 随想笔记
Even the definition sounds like a math test I'd fail.
划选高亮2026-08-11 12:23:48
原文高亮摘录
“the output of any sorting algorithm must satisfy two conditions”
Whisper 随想笔记
So that's why my custom sort broke — missed condition two.
划选高亮2026-08-11 12:14:48
原文高亮摘录
“the output of any sorting algorithm must satisfy two conditions”
Whisper 随想笔记
Two conditions? I thought it was just 'small to big' and done.
划选高亮2026-07-18 16:34:17
原文高亮摘录
“comparison sort cannot perform better than O(n log n) on average”
Whisper 随想笔记
Guess my bubble sort is officially doomed then.
划选高亮2026-07-18 13:31:17
原文高亮摘录
“stable sorting algorithms maintain the relative order of records with equal keys”
Whisper 随想笔记
Doesn't matter much for numbers, but with objects it's a lifesaver.
划选高亮2026-07-18 13:22:17
原文高亮摘录
“stable sorting algorithms maintain the relative order of records with equal keys”
Whisper 随想笔记
That's the whole reason I use stable sorts for leaderboards, ties feel fairer.
划选高亮2026-07-18 10:28:17
原文高亮摘录
“puts elements of a list into an order”
Whisper 随想笔记
I always just use sort() and hope it's fast enough.
划选高亮2026-07-18 10:19:17
原文高亮摘录
“puts elements of a list into an order”
Whisper 随想笔记
But what about stable vs unstable? That's the real debate.
划选高亮2026-07-18 10:10:17
原文高亮摘录
“puts elements of a list into an order”
Whisper 随想笔记
Basically the whole point of sorting, yeah.
分享本页 Whisper
短链接
https://domwhisper.com/s/5380bf46bdc0嵌入代码
<iframe src="https://domwhisper.com/embed/5380bf46bdc0" width="100%" height="480" style="border:0;border-radius:16px" loading="lazy"></iframe>