V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
推荐关注
Meteor
JSLint - a JavaScript code quality tool
jsFiddle
D3.js
WebStorm
推荐书目
JavaScript 权威指南第 5 版
Closure: The Definitive Guide
standbill

javascript 对象数组的访问及修改时,时间复杂度问题

  •  
  •   standbill · Sep 6, 2017 · 3546 views
    This topic created in 3155 days ago, the information mentioned may be changed or developed.

    仔细思考了一下
    问题 1: 对象的属性值查询,数组的某一个位置的值查询,时间复杂度是多少。
    问题 2: 数组的 shift,unshift,push,pop,时间复杂度,对象的 delete (及其他查询过程)操作时间复杂度。 对象的 keys 属性是每次修改对象时候,都进行一次维护出来的,还是访问 keys 时候进行一次计算得的。

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3747 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 10:42 · PVG 18:42 · LAX 03:42 · JFK 06:42
    ♥ Do have faith in what you're doing.