#3026: Linear Sort
PermalinkTranscript
[The panel shows five lines of code:]
function LinearSort(list):
StartTime=Time()
MergeSort(list)
Sleep(1e6*length(list)-(Time()-StartTime))
return
[Caption below the panel:]
How to sort a list in linear time
(Sourced from explainxkcd.com)
Title text:The best case is O(n), and the worst case is that someone checks why.