Index Ai Academy
Glossary · Phase 7 · Software engineering

Sift up

Moving a new item up a heap, swapping with its parent while it is smaller, until the order holds again.

Try it now

The new item climbs two levels. Every other pair of parent and child was already in order, so nothing else moves.

Learn it properly

Heaps and priority queues · A list read as a tree: the best k of a million without sorting, and where top-k hides in AI work. About 35 minutes.

Other terms from the same lesson

  • heap: A list arranged as a tree so the smallest (or largest) item is always at the front and can be removed quickly.
Keep learning

More in plain English.

1286 terms in the glossary, each with the lesson that teaches it.

1286 terms

The glossary

Every word you'll meet in AI and machine learning, explained in everyday language.

Phase 7 · lesson 35 min

Heaps and priority queues

A list read as a tree: the best k of a million without sorting, and where top-k hides in AI work.

Never trained an AI? Teach a small one to write, right in your browser. It takes about 20 seconds and needs no account. Teach it to write