Table of Contents

Static Array

A static array is like a box that you can store things in, or take things out of. It can only fit a certain number of things, before getting full. You can’t make the box bigger or smaller.

A static array is a data structure with a fixed size, where objects or data types can be stored.

Untitled

Static Array

Dynamic Array

Imagine a resizable box. You can put as many things as you want into it, and it’ll become as big as it needs to, to hold it all. If you take stuff out, it will shrink too. That’s a dynamic array.

A dynamic array is an array with dynamic size. In addition to indexing an item or searching for a specific item, you can also add or remove items to the array, and its size will adjust accordingly. If you add an extra item, the array size will expand to hold the item and more (there will be empty slots).

Untitled

Dynamic Array

Implementation