Module · Arrays
Watch how insertions and deletions physically shift elements in memory.
Memory Block · Base 1000
Size: 4/8 · Insertion/Deletion: O(n)
Array initialized with 4 elements in contiguous memory.
Access
Search
Insert
Delete
Arrays store elements in contiguous memory blocks. Each index maps to a fixed memory address, which makes random access instant.
Inserting or deleting in the middle requires shifting every subsequent element — that is why those operations cost O(n) time.