Algorithms

Array

A list of elements stored next to each other in memory. Since each takes the same space, you can jump straight to any position.

Example

In an array of 1,000 numbers, reading position 500 is 1 step. Inserting one at the start forces all 1,000 to shift one place.

Test yourself: Array

Arrays

In most languages, an array's first element is at position ___.

Lessons that use it

More algorithms terms

All terms →

Arki, the beaver mascot

Your next interview starts with 5 minutes today.

Free on iOS and Android. Start from zero, no account needed.