TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Inefficient sort algorithms (2001)

37 点作者 samaysharma大约 10 年前

9 条评论

twic大约 10 年前
Thanks to the Web, we can now do so much worse:<p><a href="http:&#x2F;&#x2F;gkoberger.github.io&#x2F;stacksort&#x2F;" rel="nofollow">http:&#x2F;&#x2F;gkoberger.github.io&#x2F;stacksort&#x2F;</a><p><i>So</i> much worse:<p><a href="http:&#x2F;&#x2F;jort.technology&#x2F;" rel="nofollow">http:&#x2F;&#x2F;jort.technology&#x2F;</a>
ericfrederich大约 10 年前
This is my favorite one:<p><pre><code> https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=8798202 http:&#x2F;&#x2F;dis.4chan.org&#x2F;read&#x2F;prog&#x2F;1295544154&#x2F;</code></pre>
FeepingCreature大约 10 年前
See also this classic of a paper: Pessimal Algorithms and Simplexity Analysis (pdf) <a href="http:&#x2F;&#x2F;www.researchgate.net&#x2F;profile&#x2F;Andrei_Broder&#x2F;publication&#x2F;2805500_Pessimal_Algorithms_and_Simplexity_Analysis&#x2F;links&#x2F;00b7d5187d62f61ee4000000.pdf" rel="nofollow">http:&#x2F;&#x2F;www.researchgate.net&#x2F;profile&#x2F;Andrei_Broder&#x2F;publicatio...</a><p>&gt; Table search can be viewed as a special cast of the following more general problem. We are given a “maze”, i.e. an undirected graph G with n nodes, and an “entry” node u in it. Our task is to find a path from u to a specified “exit” node v, by walking on the maze one edge at a time. [...]<p>&gt; However, suppose the maze is actually quite agreeable, so much so that we wouldn’t mind spending a few extra cycles in the search for v; in fact we vaguely hope, nay, decidedly wish, that the search will take as long as possible, and even though our sense of duty prevents us from giving up the search altogether, we are not that insensitive to the primeval necessities of our human nature, and besides what is wrong with taking a more relaxed attitude to the problem, as long as we do what we are supposed to do, since we have always been told that haste makes waste, and no one needs to be perfect anyway, and so forth. With these assumptions, the problem falls squarely within the domain of our theory.
smhenderson大约 10 年前
After reading the good news about MS and OpenSSH this was the best quote from the article for me:<p><i>The identity of the serpent is obscure. It is rumored that he is currently running a computer company in Redmond.</i><p>People get pretty riled up about sorting!
bquinlan大约 10 年前
I actually agree with this remark: &quot;In the talk.origins newsgroup someone made an offhand remark that they didn&#x27;t see how anybody, no matter how klutzy their programming, could write an O(n^3) sort.&quot;<p>The examples were all constructed by smart people who are deliberately trying to invent slow algorithms. I don&#x27;t think that a klutzy programmer would stumble upon any of them by chance.<p>The slowest sorting algorithm that I&#x27;ve seen in production was something like this:<p><pre><code> def sort(l): s = [] while len(l) &gt; 0: m = max(l) s.append(m) l.remove(m) s.reverse() return s </code></pre> I looked like a hero when I reduced the main page load time for our biggest customer by 90% in one afternoon :-)
imh大约 10 年前
<a href="http:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;2609857&#x2F;are-there-any-worse-sorting-algorithms-than-bogosort-a-k-a-monkey-sort" rel="nofollow">http:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;2609857&#x2F;are-there-any-wor...</a>
评论 #9649672 未加载
chowells大约 10 年前
Always funny to see your own name come up in submissions to a story from 14 years ago..
nosuchthing大约 10 年前
15 Sort Algorithms: Visualized &amp; Audible<p><a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=kPRA0W1kECg" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=kPRA0W1kECg</a>
xyproto大约 10 年前
I can&#x27;t believe sleep sort isn&#x27;t there!