A data structure (DS) is a way of organizing data so that it can be used effectively.

Complexities review

Complexity for DS

Array

Untitled

Overview

An array organizes items sequentially, one after another in memory. Each position in the array has an index, starting at 0.

Strengths

Weaknesses


List

Untitled

Overview

A dynamic array is an array with a big improvement: automatic resizing. One limitation of arrays is that they’re fixed size, meaning you need to specify the number of elements your array will hold ahead of time. A dynamic array expands as you add more elements. So you don’t need to determine the size ahead of time.

Strengths