Module 1 · Arrays · Arrays Basics

Array operations

An array is a row of fixed slots. Reading or replacing a slot jumps straight to it, while inserting or deleting has to shift every element after it, one at a time. Pick an operation, or run a sequence of calls on an array that starts with your values, and watch each step.

Operation

Time complexity

For an array holding n elements. The highlighted row is the operation you are visualizing.