A walkthrough of Big O time complexity for common Swift array operations. Covers insertion at the end (O(1) amortized for dynamic arrays, O(n) for static arrays), removal at the beginning and middle (both O(n)), removal at the end (O(1)), and copying (O(n) time and space). Explains why dynamic arrays occasionally hit O(n)

2m watch time

Sort: