3 ms·
You can make dynamic arrays have worst case O(1) at the cost of some extra overhead.
by eru 4y ago
You can make dynamic arrays have worst case O(1) at the cost of some extra overhead.
- bjoli 4y agoCopy the array on every append? :)
- Slasher1337 4y agoThat would not be O(1), but O(n) per insert.