DSA · Reimagined
Arrays easy time O(n) space O(1)

Delete from an Array

Removing position p leaves a hole; every element after p shifts one place left to close it. That shifting is the O(n) cost.

4
0
8
1
15
2
16
3
23
4

Delete the element at index 2 — the value 15.

1 / 5

Practice

Machine twin: /dsa-viz-v2/array-delete.json — the full deterministic run as structured data.