Interactive playground

Data Structure Lab

Build, inspect, and step through the structures behind modern software.

Algorithms course

Array

Contiguous indexed storage with fast random access.

n = 0
Choose one of 4 operations

What do you want to do?

Algorithm used Linear search

Compare each value from left to right and stop at the first match.

search(4)Scans values from left to right until a match is found.

No operation run yetSelect an operation and provide its input.

The output and cost will appear here.

Steps-Return value-
Ready
Search0 comparisons made
Last operation Load
Touched 0 nodes
Measured 0.000 ms
Growth O(1)

Best for

Watch out

Memory