{
  "schema_version": "1.0",
  "codex": "thecodex.expert/coding",
  "type": "data-structure",
  "slug": "data-structures/arrays",
  "name": "Array (Data Structure)",
  "section": "Data Structures",
  "canonical_definition": "An array is a contiguous block of memory divided into equal-sized slots, where any slot can be accessed in O(1) time using its integer index and the formula base_address + index * element_size.",
  "complexity": {
    "access": "O(1)",
    "search": "O(n)",
    "insert": "O(n)",
    "delete": "O(n)",
    "append_amortised": "O(1)",
    "space": "O(n)"
  },
  "confidence": "high",
  "last_verified": "2026-06-01",
  "source_count": 4,
  "url": "https://thecodex.expert/coding/data-structures/arrays/",
  "concept_relationship": {
    "requires_first": [
      "concepts/arrays",
      "concepts/variables"
    ],
    "enables": [
      "data-structures/hash-tables",
      "algorithms/sorting"
    ],
    "commonly_confused_with": [
      "Python list != C array",
      "array decay in C (sizeof gives bytes not element count)",
      "O(n) insert/delete due to shifting"
    ]
  },
  "sources": [
    {
      "num": 1,
      "citation": "CLRS 4th ed. \u00a717.4",
      "tier": 1
    },
    {
      "num": 2,
      "citation": "ISO C17 \u00a76.3.2.1 \u00a76.5.6",
      "tier": 1
    },
    {
      "num": 3,
      "citation": "Java Language Specification \u00a710",
      "tier": 1
    },
    {
      "num": 4,
      "citation": "Knuth TAOCP Vol.1 \u00a72.2",
      "tier": 1
    }
  ]
}