Javascript 对象数组的访问及修改时,时间复杂度问题 - V2EX
standbill

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

  •  
  •   standbill Sep 6, 2017 3630 views
    This topic created in 3194 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     916 Online   Highest 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 29ms UTC 19:44 PVG 03:44 LAX 12:44 JFK 15:44
    Do have faith in what you're doing.