A deep dive into how Static & Dynamic arrays are declared in memory and a brief introduction to their time complexities. We discuss how the power of 2 leads to an amortised time complexity of O(1) for insertion in an array, even in a dynamic array. I will go into this further in the next video when I talk about Big O.
Part 1: • Data Structures & Algorithms | Arrays 1 - RAM
View more: https://nickderaj.com/youtube/dsa-arr...
If it helped, leave a like and comment on what you'd like to see in future videos! ✌️
Chapters:
0:00 Introduction
0:19 Static Array
1:13 Accessing by index & 0 indexing
2:30 Why Dynamic Arrays?
3:34 Dynamic Arrays
5:15 Why double the size every time?
6:52 Overall recap