AlgoScope

Array

Data structurebeginnerLinear Structures

Numbered slots side by side, so reaching any one of them costs the same.

Result · step 2 of 6Array: Insert 7 at index 2
501142234856i

Move 8 from index 4 to index 5.

Open in the player →or start at step 2

What you will see

INDEX -> CELL -> VALUE; insert shifts neighbours right, delete shifts left.

How array works →

Cost

accessO(1)
searchO(n)
insertO(n)
deleteO(n)
SpaceO(n)

Insert and delete at the end are O(1) when capacity allows.

How you work with it here

play it through, step one change at a time, scrub to any step, run it on your own input, try operations in any order.

Screen readers: Each element is an accessibility element with position, value and state; structural changes are announced per step.

Reduced motion: Elements appear at their destination with a crossfade; no travel longer than the element's own size.

Taught by the same lesson

Array covers these too, in the same run.