Nepedia
Back to Discover
Independent Reader
💻

Associative array

technology Maturity 11-13 Next article →

Computers use a special way to store information. It is called an associative array. You might also hear it called a dictionary or a map.

Hash table average insertion time
Hash table average insertion time

This tool links a key to a value. A key is like a label. The value is the thing the label belongs to. Imagine a library. A book title is the key. The person who borrowed it is the value.

There are three main things you can do with a dictionary. First, you can insert a new pair. This adds a key and a value together. Second, you can remove a pair. This takes a key and its value away. Third, you can perform a lookup. This means you use a key to find its value.

Computers use different ways to build these arrays. One way is a hash table. A hash table uses a math rule to put keys into buckets. This makes finding things very fast. Another way uses search trees. These trees keep the keys in a specific order. This helps the computer find a range of items. Some languages have these tools built right in. They help programmers manage data easily.

190 words

Where will your curiosity go next?

Keep exploring at your chosen reading level.

🖼️ Images & Media (1)
File:Hash table average insertion time.png
Hash table average insertion time.png
More to explore

What is Nepedia?

A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.