{
  "schema_version": "1.0",
  "codex": "thecodex.expert/coding",
  "type": "data-structure",
  "slug": "data-structures/linked-lists",
  "name": "Linked Lists",
  "section": "Data Structures",
  "canonical_definition": "A linked list is a data structure in which each element (node) stores a value and a pointer to the next node, forming a chain that allows O(1) insertion and deletion at the head but requires O(n) traversal to access an element by position.",
  "complexity": {
    "access": "O(n)",
    "search": "O(n)",
    "insert_head": "O(1)",
    "insert_position": "O(n)",
    "delete_head": "O(1)",
    "space": "O(n)"
  },
  "confidence": "high",
  "last_verified": "2026-06-01",
  "source_count": 4,
  "url": "https://thecodex.expert/coding/data-structures/linked-lists/",
  "concept_relationship": {
    "requires_first": [
      "concepts/variables",
      "data-structures/arrays"
    ],
    "enables": [
      "data-structures/stacks",
      "data-structures/queues"
    ],
    "commonly_confused_with": [
      "Python list is a dynamic array not a linked list",
      "not cache-friendly",
      "singly linked deletion requires predecessor node"
    ]
  },
  "sources": [
    {
      "num": 1,
      "citation": "CLRS 4th ed. \u00a710.2",
      "tier": 1
    },
    {
      "num": 2,
      "citation": "Knuth TAOCP Vol.1 \u00a72.2.3",
      "tier": 1
    },
    {
      "num": 3,
      "citation": "Floyd 1967 JACM 14(4) \u2014 cycle detection",
      "tier": 1
    },
    {
      "num": 4,
      "citation": "ISO C17 \u00a77.22.3 (malloc)",
      "tier": 1
    }
  ]
}