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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Ask HN: How do people come up with unique algorithms?

4 点作者 debanjan16超过 2 年前
University courses or books teach analysis of algorithms more than design? Where do people learn how to come up with new algorithms? Precisely speaking how to learn "design" of algorithms?

4 条评论

codingdave超过 2 年前
I&#x27;d first recommend that you not put the word &#x27;algorithm&#x27; on a pedestal. Every time we write code, we write a new algorithm.<p>I suspect what you really mean is to ask how we create an algorithm so effective and useful that it gets re-used across the industry and taught in schools? In that case, it tends to happen organically - a need arises due to something new in our world&#x2F;industry, many people devise their own solutions, but eventually someone devises a novel solution that makes everyone say, &quot;Yeah, that is better.&quot;, and it gets shared around.
julienreszka超过 2 年前
Often people come up with new algorithms by taking inspiration from existing ones. For example, someone might see a sorting algorithm and think of a way to improve it, or they might see a search algorithm and think of a way to make it more efficient. There&#x27;s no one way to design an algorithm, so it&#x27;s often a matter of trial and error until something works well. One more thing: Don&#x27;t forget that a lot of the time, people don&#x27;t come up with new algorithms, they just implement existing ones. So while someone might not be coming up with a new algorithm, they might be coming up with a new way to implement an existing algorithm that is more efficient or more effective in some way.
Dracophoenix超过 2 年前
Learn mathematics or a math-adjacent field (e.g. physics) rigorously. The famous algorithms you&#x27;ll hear about are ones that optimize a certain calculation to require less computationally heavy or fewer overall &quot;steps&quot; to get to an answer. A new algorithm is just a new way to solve a problem or class of problems within a given set of constraints in a systematic way.
bubblehack3r超过 2 年前
An algorithm is just a set process to calculate something. Once there is something new to calculate - a new algorithm will usually be born.<p>Usually new things that need to be calculated require new calculation steps. These steps chained together into a process is an algorithm.<p>After achieving a first working version, optimizations are usually put into place. for example chaining previously written algorithms.<p>Hope this helps.