{
  "tag": "QAKMJW",
  "kind": "concept",
  "slug": "constant-time",
  "name": "Constant time",
  "aliases": [
    "O(1) time"
  ],
  "area": "foundations/asymptotic-analysis",
  "level": "intro",
  "summary": "Running time that does not grow with input size.",
  "prereqs": [
    "asymptotic-notation",
    "time-complexity"
  ],
  "sources": [
    {
      "book": "isbn:9780262046305",
      "title": "Cormen, Leiserson, Rivest and Stein, Introduction to Algorithms, fourth edition",
      "locator": "Section 2.2 (the RAM model), Chapter 11 (hash tables) and Section 16.4 (dynamic tables)"
    },
    {
      "book": "isbn:9780321573513",
      "title": "Robert Sedgewick and Kevin Wayne, Algorithms, fourth edition",
      "locator": "Section 1.4"
    },
    {
      "book": "isbn:9780201896831",
      "title": "Donald E. Knuth, The Art of Computer Programming, Volume 1, third edition",
      "locator": "Section 1.2.11.1"
    },
    {
      "paper": "Michael L. Fredman, János Komlós and Endre Szemerédi, Storing a sparse table with O(1) worst case access time, Journal of the ACM 31 (1984)",
      "locator": "the two-level perfect hashing scheme"
    },
    {
      "paper": "Rasmus Pagh and Flemming Friche Rodler, Cuckoo hashing, Journal of Algorithms 51 (2004)",
      "locator": "worst-case constant lookup time"
    }
  ],
  "see_also": [
    "common-growth-rates",
    "logarithmic-time",
    "linear-time",
    "sublinear-time",
    "word-ram",
    "amortized-vs-worst-case",
    "amortized-vs-expected-cost",
    "hash-table"
  ],
  "url": "https://algorithm.tamnd.com/constant-time/",
  "path": "nodes/foundations/asymptotic-analysis/constant-time",
  "status": {
    "slug": "constant-time",
    "h": {
      "level": 0,
      "max": 3,
      "label": "H0",
      "name": "no proof",
      "next": [
        "add a proof in proofs/ (06.5)"
      ]
    },
    "l": {
      "level": 0,
      "max": 4,
      "label": "L0",
      "name": "no Lean part",
      "next": [
        "name a Lean module in the lean field (07)"
      ]
    },
    "i": {},
    "v": {
      "level": 0,
      "max": 3,
      "label": "V0",
      "name": "none",
      "next": [
        "add viz/scene.ts or a figure (10)"
      ]
    },
    "w": {
      "level": 4,
      "max": 5,
      "label": "W4",
      "name": "complete",
      "next": [
        "a review of the text: no review record reviews/QAKMJW/text.yaml"
      ]
    }
  },
  "scene": false
}
