# Memoization

*noun*

say it: **“mem-oh-ih-ZAY-shun”** **/ˌmɛmoʊɪˈzeɪʃən/**

Keeping each answer the first time a function works it out, and looking it up every time after that instead of working it out again.

## What is **memoization**?

**Memoization** (from *memo*, a note to yourself) keeps each answer the first time a function works it out, and looks it up every time after that, like writing a sum on a sticky note. When a recursive function asks the same smaller question many times, it can turn O(2ⁿ) work into O(n).

## In a sentence

- “With **memoization**, counting the ways up 50 stairs took 99 calls instead of about 40 billion.”

Level: Journeyman · [More Data Structures terms at this level](https://www.ask-codey.com/glossary?category=data-structures&level=3)

Updated: November 9, 2026

## In other subjects

- [Memoization in JavaScript](https://www.ask-codey.com/glossary/memoization)

Source: https://www.ask-codey.com/glossary/memoization-data-structures
