<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://www.explainxkcd.com/wiki/index.php?action=history&amp;feed=atom&amp;title=3026%3A_Linear_Sort</id>
		<title>3026: Linear Sort - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://www.explainxkcd.com/wiki/index.php?action=history&amp;feed=atom&amp;title=3026%3A_Linear_Sort"/>
		<link rel="alternate" type="text/html" href="https://www.explainxkcd.com/wiki/index.php?title=3026:_Linear_Sort&amp;action=history"/>
		<updated>2026-05-20T18:26:38Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>https://www.explainxkcd.com/wiki/index.php?title=3026:_Linear_Sort&amp;diff=364569&amp;oldid=prev</id>
		<title>CalibansCreations: /* Transcript */ it's complete enough to me</title>
		<link rel="alternate" type="text/html" href="https://www.explainxkcd.com/wiki/index.php?title=3026:_Linear_Sort&amp;diff=364569&amp;oldid=prev"/>
				<updated>2025-02-05T09:38:04Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Transcript: &lt;/span&gt; it&amp;#039;s complete enough to me&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 09:38, 5 February 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l19&quot; &gt;Line 19:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 19:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Transcript==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Transcript==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{incomplete transcript|Do NOT delete this tag too soon.}}&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;:[The panel shows five lines of code:]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;:[The panel shows five lines of code:]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;:function LinearSort(list):&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;:function LinearSort(list):&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>CalibansCreations</name></author>	</entry>

	<entry>
		<id>https://www.explainxkcd.com/wiki/index.php?title=3026:_Linear_Sort&amp;diff=362274&amp;oldid=prev</id>
		<title>Whoop whoop pull up: /* Explanation */</title>
		<link rel="alternate" type="text/html" href="https://www.explainxkcd.com/wiki/index.php?title=3026:_Linear_Sort&amp;diff=362274&amp;oldid=prev"/>
				<updated>2025-01-16T00:49:38Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Explanation&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 00:49, 16 January 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l12&quot; &gt;Line 12:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 12:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{w|Sorting algorithm}}s are a fundamental part of computer science, with various methods differing in efficiency, ease of implementation, and resource usage. Efficiency is often described using {{w|Big O notation}}, which expresses how the runtime of an algorithm scales with the size of the input. For example, &amp;quot;O(''n'')&amp;quot; (&amp;quot;linear time&amp;quot;) means the runtime grows proportionally to the size of the input, while &amp;quot;O(''n'' log ''n'')&amp;quot; means it grows slightly faster than linear. Faster algorithms, like O(''n''), are generally preferred for large datasets. However, it is known that no general sorting algorithms with linear runtime exist. &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{w|Sorting algorithm}}s are a fundamental part of computer science, with various methods differing in efficiency, ease of implementation, and resource usage. Efficiency is often described using {{w|Big O notation}}, which expresses how the runtime of an algorithm scales with the size of the input. For example, &amp;quot;O(''n'')&amp;quot; (&amp;quot;linear time&amp;quot;) means the runtime grows proportionally to the size of the input, while &amp;quot;O(''n'' log ''n'')&amp;quot; means it grows slightly faster than linear. Faster algorithms, like O(''n''), are generally preferred for large datasets. However, it is known that no general sorting algorithms with linear runtime exist. &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The comic presents a humorous &amp;quot;linear time&amp;quot; sorting algorithm that first uses {{w|merge sort}}, a well-known O(''n'' log ''n'') algorithm, to sort the list. It then &amp;quot;sleeps&amp;quot; for an additional amount of time to artificially make the runtime scale linearly with the size of the input. Specifically, it pauses for &amp;lt;code&amp;gt;(1 million) * length(list) - (time spent sorting)&amp;lt;/code&amp;gt; seconds, which is perhaps large enough (in the case of all practical implementations) to stretch to a knowable point beyond the actual time spent sorting, ensuring the overall runtime appears to grow linearly. This is a joke because the actual sorting is still O(''n'' log ''n''); the additional sleep time is simply wasted time to give the illusion of linear time. It's also a joke because it makes the sort so slow that it's useless, with a &amp;quot;sort&amp;quot; of one item taking upwards of 11 ''days'', two items taking 23 days, three taking 34 days, and so on. Another 'sort' that technically works but takes more time is necessary, by definition, is the [https://www.geeksforgeeks.org/sleep-sort-in-python/ sleep sort].&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The comic presents a humorous &amp;quot;linear time&amp;quot; sorting algorithm that first uses {{w|merge sort}}, a well-known O(''n'' log ''n'') algorithm, to sort the list. It then &amp;quot;sleeps&amp;quot; for an additional amount of time to artificially make the runtime scale linearly with the size of the input. Specifically, it pauses for &amp;lt;code&amp;gt;(1 million) * length(list) - (time spent sorting)&amp;lt;/code&amp;gt; seconds, which is perhaps large enough (in the case of all practical implementations) to stretch to a knowable point beyond the actual time spent sorting, ensuring the overall runtime appears to grow linearly. This is a joke because the actual sorting is still O(''n'' log ''n''); the additional sleep time is simply wasted time to give the illusion of linear time. It's also a joke because it makes the sort so slow that it's useless, with a &amp;quot;sort&amp;quot; of one item taking upwards of 11 ''days'', two items taking 23 days, three taking 34 days, and so on. Another 'sort' that technically works but takes more time &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;than &lt;/ins&gt;is necessary, by definition, is the [https://www.geeksforgeeks.org/sleep-sort-in-python/ sleep sort].&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The humor lies in the absurdity of intentionally slowing down a sorting algorithm to match a desired runtime profile. This defeats the purpose of optimization, as the goal of sorting algorithms is typically to minimize time spent, not to pad it with unnecessary delays. (Delays may be necessary for other functional reasons, but are an antithesis of the kind of optimality sought here.) If the artificial sleep were removed, the algorithm would revert to its true O(''n'' log ''n'') efficiency, making the &amp;quot;linear sort&amp;quot; label both deceptive and wastefully unnecessary.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The humor lies in the absurdity of intentionally slowing down a sorting algorithm to match a desired runtime profile. This defeats the purpose of optimization, as the goal of sorting algorithms is typically to minimize time spent, not to pad it with unnecessary delays. (Delays may be necessary for other functional reasons, but are an antithesis of the kind of optimality sought here.) If the artificial sleep were removed, the algorithm would revert to its true O(''n'' log ''n'') efficiency, making the &amp;quot;linear sort&amp;quot; label both deceptive and wastefully unnecessary.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Whoop whoop pull up</name></author>	</entry>

	<entry>
		<id>https://www.explainxkcd.com/wiki/index.php?title=3026:_Linear_Sort&amp;diff=361741&amp;oldid=prev</id>
		<title>162.158.74.49: /* Explanation */ Whether this comic is a reference to it is debatble, but there are definite similarities</title>
		<link rel="alternate" type="text/html" href="https://www.explainxkcd.com/wiki/index.php?title=3026:_Linear_Sort&amp;diff=361741&amp;oldid=prev"/>
				<updated>2025-01-11T20:44:22Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Explanation: &lt;/span&gt; Whether this comic is a reference to it is debatble, but there are definite similarities&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 20:44, 11 January 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l12&quot; &gt;Line 12:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 12:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{w|Sorting algorithm}}s are a fundamental part of computer science, with various methods differing in efficiency, ease of implementation, and resource usage. Efficiency is often described using {{w|Big O notation}}, which expresses how the runtime of an algorithm scales with the size of the input. For example, &amp;quot;O(''n'')&amp;quot; (&amp;quot;linear time&amp;quot;) means the runtime grows proportionally to the size of the input, while &amp;quot;O(''n'' log ''n'')&amp;quot; means it grows slightly faster than linear. Faster algorithms, like O(''n''), are generally preferred for large datasets. However, it is known that no general sorting algorithms with linear runtime exist. &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{w|Sorting algorithm}}s are a fundamental part of computer science, with various methods differing in efficiency, ease of implementation, and resource usage. Efficiency is often described using {{w|Big O notation}}, which expresses how the runtime of an algorithm scales with the size of the input. For example, &amp;quot;O(''n'')&amp;quot; (&amp;quot;linear time&amp;quot;) means the runtime grows proportionally to the size of the input, while &amp;quot;O(''n'' log ''n'')&amp;quot; means it grows slightly faster than linear. Faster algorithms, like O(''n''), are generally preferred for large datasets. However, it is known that no general sorting algorithms with linear runtime exist. &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The comic presents a humorous &amp;quot;linear time&amp;quot; sorting algorithm that first uses {{w|merge sort}}, a well-known O(''n'' log ''n'') algorithm, to sort the list. It then &amp;quot;sleeps&amp;quot; for an additional amount of time to artificially make the runtime scale linearly with the size of the input. Specifically, it pauses for &amp;lt;code&amp;gt;(1 million) * length(list) - (time spent sorting)&amp;lt;/code&amp;gt; seconds, which is perhaps large enough (in the case of all practical implementations) to stretch to a knowable point beyond the actual time spent sorting, ensuring the overall runtime appears to grow linearly. This is a joke because the actual sorting is still O(''n'' log ''n''); the additional sleep time is simply wasted time to give the illusion of linear time. It's also a joke because it makes the sort so slow that it's useless, with a &amp;quot;sort&amp;quot; of one item taking upwards of 11 ''days'', two items taking 23 days, three taking 34 days, and so on. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;This &lt;/del&gt;is &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;also a reference to &lt;/del&gt;[https://www.geeksforgeeks.org/sleep-sort-in-python/ sleep sort]&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;, a well known joke algorithm for sorting&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The comic presents a humorous &amp;quot;linear time&amp;quot; sorting algorithm that first uses {{w|merge sort}}, a well-known O(''n'' log ''n'') algorithm, to sort the list. It then &amp;quot;sleeps&amp;quot; for an additional amount of time to artificially make the runtime scale linearly with the size of the input. Specifically, it pauses for &amp;lt;code&amp;gt;(1 million) * length(list) - (time spent sorting)&amp;lt;/code&amp;gt; seconds, which is perhaps large enough (in the case of all practical implementations) to stretch to a knowable point beyond the actual time spent sorting, ensuring the overall runtime appears to grow linearly. This is a joke because the actual sorting is still O(''n'' log ''n''); the additional sleep time is simply wasted time to give the illusion of linear time. It's also a joke because it makes the sort so slow that it's useless, with a &amp;quot;sort&amp;quot; of one item taking upwards of 11 ''days'', two items taking 23 days, three taking 34 days, and so on. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Another 'sort' that technically works but takes more time &lt;/ins&gt;is &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;necessary, by definition, is the &lt;/ins&gt;[https://www.geeksforgeeks.org/sleep-sort-in-python/ sleep sort].&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The humor lies in the absurdity of intentionally slowing down a sorting algorithm to match a desired runtime profile. This defeats the purpose of optimization, as the goal of sorting algorithms is typically to minimize time spent, not to pad it with unnecessary delays. (Delays may be necessary for other functional reasons, but are an antithesis of the kind of optimality sought here.) If the artificial sleep were removed, the algorithm would revert to its true O(''n'' log ''n'') efficiency, making the &amp;quot;linear sort&amp;quot; label both deceptive and wastefully unnecessary.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The humor lies in the absurdity of intentionally slowing down a sorting algorithm to match a desired runtime profile. This defeats the purpose of optimization, as the goal of sorting algorithms is typically to minimize time spent, not to pad it with unnecessary delays. (Delays may be necessary for other functional reasons, but are an antithesis of the kind of optimality sought here.) If the artificial sleep were removed, the algorithm would revert to its true O(''n'' log ''n'') efficiency, making the &amp;quot;linear sort&amp;quot; label both deceptive and wastefully unnecessary.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>162.158.74.49</name></author>	</entry>

	<entry>
		<id>https://www.explainxkcd.com/wiki/index.php?title=3026:_Linear_Sort&amp;diff=361707&amp;oldid=prev</id>
		<title>Firestar233: i don't see how this is related to statistics, added by same user who added another weird category</title>
		<link rel="alternate" type="text/html" href="https://www.explainxkcd.com/wiki/index.php?title=3026:_Linear_Sort&amp;diff=361707&amp;oldid=prev"/>
				<updated>2025-01-11T08:21:38Z</updated>
		
		<summary type="html">&lt;p&gt;i don&amp;#039;t see how this is related to statistics, added by same user who added another weird category&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 08:21, 11 January 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l33&quot; &gt;Line 33:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 33:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Programming]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Programming]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Statistics]]&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Firestar233</name></author>	</entry>

	<entry>
		<id>https://www.explainxkcd.com/wiki/index.php?title=3026:_Linear_Sort&amp;diff=361704&amp;oldid=prev</id>
		<title>162.158.154.124 at 08:17, 11 January 2025</title>
		<link rel="alternate" type="text/html" href="https://www.explainxkcd.com/wiki/index.php?title=3026:_Linear_Sort&amp;diff=361704&amp;oldid=prev"/>
				<updated>2025-01-11T08:17:56Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 08:17, 11 January 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l12&quot; &gt;Line 12:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 12:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{w|Sorting algorithm}}s are a fundamental part of computer science, with various methods differing in efficiency, ease of implementation, and resource usage. Efficiency is often described using {{w|Big O notation}}, which expresses how the runtime of an algorithm scales with the size of the input. For example, &amp;quot;O(''n'')&amp;quot; (&amp;quot;linear time&amp;quot;) means the runtime grows proportionally to the size of the input, while &amp;quot;O(''n'' log ''n'')&amp;quot; means it grows slightly faster than linear. Faster algorithms, like O(''n''), are generally preferred for large datasets. However, it is known that no general sorting algorithms with linear runtime exist. &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{w|Sorting algorithm}}s are a fundamental part of computer science, with various methods differing in efficiency, ease of implementation, and resource usage. Efficiency is often described using {{w|Big O notation}}, which expresses how the runtime of an algorithm scales with the size of the input. For example, &amp;quot;O(''n'')&amp;quot; (&amp;quot;linear time&amp;quot;) means the runtime grows proportionally to the size of the input, while &amp;quot;O(''n'' log ''n'')&amp;quot; means it grows slightly faster than linear. Faster algorithms, like O(''n''), are generally preferred for large datasets. However, it is known that no general sorting algorithms with linear runtime exist. &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The comic presents a humorous &amp;quot;linear time&amp;quot; sorting algorithm that first uses {{w|merge sort}}, a well-known O(''n'' log ''n'') algorithm, to sort the list. It then &amp;quot;sleeps&amp;quot; for an additional amount of time to artificially make the runtime scale linearly with the size of the input. Specifically, it pauses for &amp;lt;code&amp;gt;(1 million) * length(list) - (time spent sorting)&amp;lt;/code&amp;gt; seconds, which is perhaps large enough (in the case of all practical implementations) to stretch to a knowable point beyond the actual time spent sorting, ensuring the overall runtime appears to grow linearly. This is a joke because the actual sorting is still O(''n'' log ''n''); the additional sleep time is simply wasted time to give the illusion of linear time. It's also a joke because it makes the sort so slow that it's useless, with a &amp;quot;sort&amp;quot; of one item taking upwards of 11 ''days'', two items taking 23 days, three taking 34 days, and so on.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The comic presents a humorous &amp;quot;linear time&amp;quot; sorting algorithm that first uses {{w|merge sort}}, a well-known O(''n'' log ''n'') algorithm, to sort the list. It then &amp;quot;sleeps&amp;quot; for an additional amount of time to artificially make the runtime scale linearly with the size of the input. Specifically, it pauses for &amp;lt;code&amp;gt;(1 million) * length(list) - (time spent sorting)&amp;lt;/code&amp;gt; seconds, which is perhaps large enough (in the case of all practical implementations) to stretch to a knowable point beyond the actual time spent sorting, ensuring the overall runtime appears to grow linearly. This is a joke because the actual sorting is still O(''n'' log ''n''); the additional sleep time is simply wasted time to give the illusion of linear time. It's also a joke because it makes the sort so slow that it's useless, with a &amp;quot;sort&amp;quot; of one item taking upwards of 11 ''days'', two items taking 23 days, three taking 34 days, and so on&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;. This is also a reference to [https://www.geeksforgeeks.org/sleep-sort-in-python/ sleep sort], a well known joke algorithm for sorting&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The humor lies in the absurdity of intentionally slowing down a sorting algorithm to match a desired runtime profile. This defeats the purpose of optimization, as the goal of sorting algorithms is typically to minimize time spent, not to pad it with unnecessary delays. (Delays may be necessary for other functional reasons, but are an antithesis of the kind of optimality sought here.) If the artificial sleep were removed, the algorithm would revert to its true O(''n'' log ''n'') efficiency, making the &amp;quot;linear sort&amp;quot; label both deceptive and wastefully unnecessary.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The humor lies in the absurdity of intentionally slowing down a sorting algorithm to match a desired runtime profile. This defeats the purpose of optimization, as the goal of sorting algorithms is typically to minimize time spent, not to pad it with unnecessary delays. (Delays may be necessary for other functional reasons, but are an antithesis of the kind of optimality sought here.) If the artificial sleep were removed, the algorithm would revert to its true O(''n'' log ''n'') efficiency, making the &amp;quot;linear sort&amp;quot; label both deceptive and wastefully unnecessary.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>162.158.154.124</name></author>	</entry>

	<entry>
		<id>https://www.explainxkcd.com/wiki/index.php?title=3026:_Linear_Sort&amp;diff=361047&amp;oldid=prev</id>
		<title>172.69.225.244: /* Explanation */ Specified that no linear time sorting algorithms exist.</title>
		<link rel="alternate" type="text/html" href="https://www.explainxkcd.com/wiki/index.php?title=3026:_Linear_Sort&amp;diff=361047&amp;oldid=prev"/>
				<updated>2025-01-04T11:42:07Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Explanation: &lt;/span&gt; Specified that no linear time sorting algorithms exist.&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 11:42, 4 January 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l10&quot; &gt;Line 10:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 10:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Explanation==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Explanation==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{w|Sorting algorithm}}s are a fundamental part of computer science, with various methods differing in efficiency, ease of implementation, and resource usage. Efficiency is often described using {{w|Big O notation}}, which expresses how the runtime of an algorithm scales with the size of the input. For example, &amp;quot;O(''n'')&amp;quot; (&amp;quot;linear time&amp;quot;) means the runtime grows proportionally to the size of the input, while &amp;quot;O(''n'' log ''n'')&amp;quot; means it grows slightly faster than linear. Faster algorithms, like O(''n''), are generally preferred for large datasets.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{w|Sorting algorithm}}s are a fundamental part of computer science, with various methods differing in efficiency, ease of implementation, and resource usage. Efficiency is often described using {{w|Big O notation}}, which expresses how the runtime of an algorithm scales with the size of the input. For example, &amp;quot;O(''n'')&amp;quot; (&amp;quot;linear time&amp;quot;) means the runtime grows proportionally to the size of the input, while &amp;quot;O(''n'' log ''n'')&amp;quot; means it grows slightly faster than linear. Faster algorithms, like O(''n''), are generally preferred for large datasets&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;. However, it is known that no general sorting algorithms with linear runtime exist&lt;/ins&gt;. &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The comic presents a humorous &amp;quot;linear time&amp;quot; sorting algorithm that first uses {{w|merge sort}}, a well-known O(''n'' log ''n'') algorithm, to sort the list. It then &amp;quot;sleeps&amp;quot; for an additional amount of time to artificially make the runtime scale linearly with the size of the input. Specifically, it pauses for &amp;lt;code&amp;gt;(1 million) * length(list) - (time spent sorting)&amp;lt;/code&amp;gt; seconds, which is perhaps large enough (in the case of all practical implementations) to stretch to a knowable point beyond the actual time spent sorting, ensuring the overall runtime appears to grow linearly. This is a joke because the actual sorting is still O(''n'' log ''n''); the additional sleep time is simply wasted time to give the illusion of linear time. It's also a joke because it makes the sort so slow that it's useless, with a &amp;quot;sort&amp;quot; of one item taking upwards of 11 ''days'', two items taking 23 days, three taking 34 days, and so on.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The comic presents a humorous &amp;quot;linear time&amp;quot; sorting algorithm that first uses {{w|merge sort}}, a well-known O(''n'' log ''n'') algorithm, to sort the list. It then &amp;quot;sleeps&amp;quot; for an additional amount of time to artificially make the runtime scale linearly with the size of the input. Specifically, it pauses for &amp;lt;code&amp;gt;(1 million) * length(list) - (time spent sorting)&amp;lt;/code&amp;gt; seconds, which is perhaps large enough (in the case of all practical implementations) to stretch to a knowable point beyond the actual time spent sorting, ensuring the overall runtime appears to grow linearly. This is a joke because the actual sorting is still O(''n'' log ''n''); the additional sleep time is simply wasted time to give the illusion of linear time. It's also a joke because it makes the sort so slow that it's useless, with a &amp;quot;sort&amp;quot; of one item taking upwards of 11 ''days'', two items taking 23 days, three taking 34 days, and so on.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l17&quot; &gt;Line 17:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 17:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The title text extends the joke by referencing &amp;quot;best&amp;quot; and &amp;quot;worst&amp;quot; cases, concepts in {{w|algorithm analysis}} that describe how the runtime varies with different inputs. For the &amp;quot;linear sort,&amp;quot; the best and worst cases are identical because the sleep function forces the runtime to always be O(''n''), regardless of the input. The &amp;quot;worst case for the author,&amp;quot; however, is when someone examines the code, exposes the fraud, and damages their reputation—a humorous twist on the idea of worst-case scenarios.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The title text extends the joke by referencing &amp;quot;best&amp;quot; and &amp;quot;worst&amp;quot; cases, concepts in {{w|algorithm analysis}} that describe how the runtime varies with different inputs. For the &amp;quot;linear sort,&amp;quot; the best and worst cases are identical because the sleep function forces the runtime to always be O(''n''), regardless of the input. The &amp;quot;worst case for the author,&amp;quot; however, is when someone examines the code, exposes the fraud, and damages their reputation—a humorous twist on the idea of worst-case scenarios.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Transcript==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Transcript==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>172.69.225.244</name></author>	</entry>

	<entry>
		<id>https://www.explainxkcd.com/wiki/index.php?title=3026:_Linear_Sort&amp;diff=360916&amp;oldid=prev</id>
		<title>172.68.205.93: Undo revision 360906 by 172.71.214.52 (talk) Sleep != Dream</title>
		<link rel="alternate" type="text/html" href="https://www.explainxkcd.com/wiki/index.php?title=3026:_Linear_Sort&amp;diff=360916&amp;oldid=prev"/>
				<updated>2025-01-03T01:06:01Z</updated>
		
		<summary type="html">&lt;p&gt;Undo revision 360906 by &lt;a href=&quot;/wiki/index.php/Special:Contributions/172.71.214.52&quot; title=&quot;Special:Contributions/172.71.214.52&quot;&gt;172.71.214.52&lt;/a&gt; (&lt;a href=&quot;/wiki/index.php?title=User_talk:172.71.214.52&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;User talk:172.71.214.52 (page does not exist)&quot;&gt;talk&lt;/a&gt;) Sleep != Dream&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 01:06, 3 January 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l35&quot; &gt;Line 35:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 35:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Programming]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Programming]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Statistics]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Statistics]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Dreams]]&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>172.68.205.93</name></author>	</entry>

	<entry>
		<id>https://www.explainxkcd.com/wiki/index.php?title=3026:_Linear_Sort&amp;diff=360906&amp;oldid=prev</id>
		<title>172.71.214.52 at 23:57, 2 January 2025</title>
		<link rel="alternate" type="text/html" href="https://www.explainxkcd.com/wiki/index.php?title=3026:_Linear_Sort&amp;diff=360906&amp;oldid=prev"/>
				<updated>2025-01-02T23:57:16Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 23:57, 2 January 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l35&quot; &gt;Line 35:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 35:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Programming]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Programming]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Statistics]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Statistics]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Dreams]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>172.71.214.52</name></author>	</entry>

	<entry>
		<id>https://www.explainxkcd.com/wiki/index.php?title=3026:_Linear_Sort&amp;diff=360316&amp;oldid=prev</id>
		<title>172.71.214.53 at 02:02, 26 December 2024</title>
		<link rel="alternate" type="text/html" href="https://www.explainxkcd.com/wiki/index.php?title=3026:_Linear_Sort&amp;diff=360316&amp;oldid=prev"/>
				<updated>2024-12-26T02:02:42Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 02:02, 26 December 2024&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l34&quot; &gt;Line 34:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 34:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Programming]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Programming]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Statistics]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>172.71.214.53</name></author>	</entry>

	<entry>
		<id>https://www.explainxkcd.com/wiki/index.php?title=3026:_Linear_Sort&amp;diff=360142&amp;oldid=prev</id>
		<title>162.158.74.25: /* Explanation */ A bit of a rewrite of the rewrite of the rewrite.</title>
		<link rel="alternate" type="text/html" href="https://www.explainxkcd.com/wiki/index.php?title=3026:_Linear_Sort&amp;diff=360142&amp;oldid=prev"/>
				<updated>2024-12-23T20:33:26Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Explanation: &lt;/span&gt; A bit of a rewrite of the rewrite of the rewrite.&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 20:33, 23 December 2024&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l12&quot; &gt;Line 12:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 12:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{w|Sorting algorithm}}s are a fundamental part of computer science, with various methods differing in efficiency, ease of implementation, and resource usage. Efficiency is often described using {{w|Big O notation}}, which expresses how the runtime of an algorithm scales with the size of the input. For example, &amp;quot;O(''n'')&amp;quot; (&amp;quot;linear time&amp;quot;) means the runtime grows proportionally to the size of the input, while &amp;quot;O(''n'' log ''n'')&amp;quot; means it grows slightly faster than linear. Faster algorithms, like O(''n''), are generally preferred for large datasets.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{w|Sorting algorithm}}s are a fundamental part of computer science, with various methods differing in efficiency, ease of implementation, and resource usage. Efficiency is often described using {{w|Big O notation}}, which expresses how the runtime of an algorithm scales with the size of the input. For example, &amp;quot;O(''n'')&amp;quot; (&amp;quot;linear time&amp;quot;) means the runtime grows proportionally to the size of the input, while &amp;quot;O(''n'' log ''n'')&amp;quot; means it grows slightly faster than linear. Faster algorithms, like O(''n''), are generally preferred for large datasets.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The comic presents a humorous &amp;quot;linear time&amp;quot; sorting algorithm that first uses {{w|merge sort}}, a well-known O(''n'' log ''n'') algorithm, to sort the list. It then &amp;quot;sleeps&amp;quot; for an additional amount of time to artificially make the runtime scale linearly with the size of the input. Specifically, it pauses for &amp;lt;code&amp;gt;(1 million) * length(list) - (time spent sorting)&amp;lt;/code&amp;gt; seconds, ensuring the overall runtime appears to grow linearly. This is a joke because the actual sorting is still O(''n'' log ''n''); the additional sleep time is simply wasted to give the illusion of linear time. It's also a joke because it makes the sort so slow that it's useless, with a &amp;quot;sort&amp;quot; of one item taking upwards of 11 ''days'', two items taking 23 days, three taking 34 days, and so on.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The comic presents a humorous &amp;quot;linear time&amp;quot; sorting algorithm that first uses {{w|merge sort}}, a well-known O(''n'' log ''n'') algorithm, to sort the list. It then &amp;quot;sleeps&amp;quot; for an additional amount of time to artificially make the runtime scale linearly with the size of the input. Specifically, it pauses for &amp;lt;code&amp;gt;(1 million) * length(list) - (time spent sorting)&amp;lt;/code&amp;gt; seconds&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;, which is perhaps large enough (in the case of all practical implementations) to stretch to a knowable point beyond the actual time spent sorting&lt;/ins&gt;, ensuring the overall runtime appears to grow linearly. This is a joke because the actual sorting is still O(''n'' log ''n''); the additional sleep time is simply wasted &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;time &lt;/ins&gt;to give the illusion of linear time. It's also a joke because it makes the sort so slow that it's useless, with a &amp;quot;sort&amp;quot; of one item taking upwards of 11 ''days'', two items taking 23 days, three taking 34 days, and so on.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The humor lies in the absurdity of intentionally slowing down a sorting algorithm to match a desired runtime profile. This defeats the purpose of optimization, as the goal of sorting algorithms is typically to minimize time spent, not to pad it with unnecessary &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;delay&lt;/del&gt;. If the artificial sleep were removed, the algorithm would revert to its true O(''n'' log ''n'') efficiency, making the &amp;quot;linear sort&amp;quot; label both deceptive and unnecessary.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The humor lies in the absurdity of intentionally slowing down a sorting algorithm to match a desired runtime profile. This defeats the purpose of optimization, as the goal of sorting algorithms is typically to minimize time spent, not to pad it with unnecessary &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;delays&lt;/ins&gt;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;(Delays may be necessary for other functional reasons, but are an antithesis of the kind of optimality sought here.) &lt;/ins&gt;If the artificial sleep were removed, the algorithm would revert to its true O(''n'' log ''n'') efficiency, making the &amp;quot;linear sort&amp;quot; label both deceptive and &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;wastefully &lt;/ins&gt;unnecessary.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The title text extends the joke by referencing &amp;quot;best&amp;quot; and &amp;quot;worst&amp;quot; cases, concepts in {{w|algorithm analysis}} that describe how the runtime varies with different inputs. For the &amp;quot;linear sort,&amp;quot; the best and worst cases are identical because the sleep function forces the runtime to always be O(''n''), regardless of the input. The &amp;quot;worst case for the author,&amp;quot; however, is when someone examines the code, exposes the fraud, and damages their reputation—a humorous twist on the idea of worst-case scenarios.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The title text extends the joke by referencing &amp;quot;best&amp;quot; and &amp;quot;worst&amp;quot; cases, concepts in {{w|algorithm analysis}} that describe how the runtime varies with different inputs. For the &amp;quot;linear sort,&amp;quot; the best and worst cases are identical because the sleep function forces the runtime to always be O(''n''), regardless of the input. The &amp;quot;worst case for the author,&amp;quot; however, is when someone examines the code, exposes the fraud, and damages their reputation—a humorous twist on the idea of worst-case scenarios.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Transcript==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Transcript==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>162.158.74.25</name></author>	</entry>

	</feed>