{
  "schema_version": "1.0",
  "codex": "thecodex.expert/coding",
  "type": "concept",
  "slug": "concepts/arrays",
  "name": "Arrays",
  "section": "CS Concepts",
  "canonical_definition": "An array is an ordered collection of values stored in contiguous memory, where every element can be accessed in O(1) time by its integer index, computed as base_address + (index * element_size).",
  "confidence": "high",
  "last_verified": "2026-06-01",
  "source_count": 4,
  "url": "https://thecodex.expert/coding/concepts/arrays/",
  "concept_relationship": {
    "requires_first": [
      "concepts/variables",
      "concepts/loops"
    ],
    "enables": [
      "data-structures/arrays",
      "algorithms/sorting",
      "concepts/objects"
    ],
    "commonly_confused_with": [
      "Python list != C array (list stores references)",
      "slice creates copy in Python",
      "OOB behaviour: UB in C, exception in Python/Java, panic in Rust"
    ]
  },
  "sources": [
    {
      "num": 1,
      "citation": "ISO C17 \u00a76.5.6",
      "tier": 1
    },
    {
      "num": 2,
      "citation": "Java Language Specification \u00a710",
      "tier": 1
    },
    {
      "num": 3,
      "citation": "Python Language Reference \u00a73.3.6",
      "tier": 1
    },
    {
      "num": 4,
      "citation": "NumPy ndarray docs",
      "tier": 1
    }
  ]
}