Quick reference
| Worst Case | |
|---|---|
| space |
Interview Cake by Exponent
In short: An array stores a fixed-size, ordered collection of elements in contiguous memory, so any element can be read or written by index in O(1) time. Inserting or deleting in the middle is O(n) because the other elements must shift.
| Worst Case | |
|---|---|
| space |