Array Delete
Close the gap by shifting everything after the slot one place left.
Array: Delete index 1
Delete index 1. Removing 1 leaves a gap that everything to the right must close.
Cost
- Best
- O(1)
- Average
- O(n)
- Worst
- O(n)
- Space
- O(1)
Best case is deletion at the end.
Before this
Related
Taught by the same lesson
Array covers these too, in the same run.