Nepedia
Back to Discover
Developing Reader
💻

Heap (data structure)

technology Maturity 11-13 Next article →

A heap is a way to group things.

Max-Heap-new
Max-Heap-new

It looks like a tree with many branches. In one kind, the biggest item stays at the top. In another kind, the smallest item stays at the top. This makes it easy to find the best item fast.

Computers use heaps to stay organized. They can add new items to the list. They can also take items away. If a new item goes in, it moves to the right spot. This is like using a sieve to sort things.

Heap-as-array
Heap-as-array

It is a very smart tool for computers.

95 words

Where will your curiosity go next?

Keep exploring at your chosen reading level.

🖼️ Images & Media (2)
File:Max-Heap-new.svg
Max-Heap-new.svg
File:Heap-as-array.svg
Heap-as-array.svg
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.