Skip to content

Latest commit

 

History

History
9 lines (8 loc) · 244 Bytes

array.md

File metadata and controls

9 lines (8 loc) · 244 Bytes

数组

  • 优点
    • O(1)的时间根据下表查询元素
    • 构建一个数组非常简单
  • 缺点
    • 构建数组必须分配一段连续的空间
    • 查询某个数组存在需要耗费 O(n)
    • 删除和添加元素同样是 O(n)