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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

There are only 3 data structures

6 点作者 andrewp123将近 2 年前

2 条评论

xcombelle将近 2 年前
&quot; I can&#x27;t imagine anything else you can possibly store about relative elements besides index and order (and nothing). Graphs are their own other planet, and I don&#x27;t think we can easily say much about them. So the 3 data structure types you can have are:<p>1. indexed data structures with an O(n) worst-case operation<p>2. order-less data structures with an O(1) worst-case operation<p>3. sorted data structures with an O(log n) worst-case operation<p>That&#x27;s it. Let me know what you think&quot;<p>I disagree.<p>sorting is a O(n*log(n)) worst-case operation for example.
评论 #37117965 未加载
andrewp123将近 2 年前
I&#x27;m not sure if this is very obvious or very interesting. Let me know what you think (I wrote the article).