zoukankan      html  css  js  c++  java
  • Array

    Arrays

    What’s special about arrays?

    ​ Constant time access

    Multi-Dimensional

    ​ (1,1) (1,1)

    ​ (1,2) (2,1)

    Row-major (1,3) (3,1) Column-Major

    ​ (1,4) (1,2)

    ​ (2,1) (2,2)

    ​ … …

    Times for common operations

    Add Remove
    Beginning O(n) O(n)
    End O(1) O(1)
    Middle O(n) O(n)

    Summary

    • ​ Array: contiguous area of memory consisting of equal-size elements indexed by contiguous integers.
    • ​ Constant access to any element.
    • ​ Constant time to add/remove at the end.
    • ​ Linear time to add/remover at an arbitrary location.
  • 相关阅读:
    dubbo springcloud区别
    rpc
    centos7 安装docker
    vibox安装
    知识点
    spring cloud
    微服务设计原则
    工具类
    xss--知识点
    java基础--注解
  • 原文地址:https://www.cnblogs.com/Glov/p/13180825.html
Copyright © 2011-2022 走看看