performance - 使用 O(1) 性能初始化 n 个元素数组?

标签 performance

有人知道我该怎么做?

谢谢

最佳答案

如果您需要对一组 n 元素中的每个元素执行某些操作,则不能以比 O( n ) 更好的性能来完成。

关于performance - 使用 O(1) 性能初始化 n 个元素数组?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/303519/

相关文章:

python - 选择每组的最大行 - Pandas 性能问题

javascript - 实例挂载后添加插件(Vue.use) (new Vue().$mount())

java - 转换或方法调用哪个更有效/更便宜?

mysql - 支持多语言的数据库的理想编码设置是什么?

分类字段和时间戳列(varchar)上的mysql分区

algorithm - Mergesort 对三个输入数组进行排序

javascript - 使用此关键字的 typescript

performance - 在 postgresql 的列上设置 "NOT NULL"会提高性能吗?

performance - 如何提高 TextLayout.draw(..) 的 Java2D 性能

performance - GHC 中的跨模块优化