> See also:
> - [[Data Structures]]
# Linear Data Structures
Linear data structures are those where the data elements are arranged sequentially or linearly, and each element is connected to its adjacent element(s) in some way.
The two most common linear data structures are **arrays** and **linked lists**.
Array
It's typically difficult to remove the first element within an ArrayList
- A *circular buffer* can be used can be used to keep track of how many elements have been removed from the beginning of the list
[[Linked Lists]]
- Linked Lists
- Terminology
- Runtimes
- Stacks and Queues
- Various implementations
- Functions
- Runtimes
## Arrays
[Pointer Arithmetic (GG)](https://www.geeksforgeeks.org/pointer-arithmetics-in-c-with-examples/)
heap vs stack
## N-Dimensional Arrays
> See also:
> - [[Tensors]]
```
stride[N-1] = 1
stride[N-2] = shape[N-1]
stride[N-3] = shape[N-2] * shape[N-1]
```
## Hash Tables
- Use a key:value mapping system
- Similar to how dictionaries function within python
- **Hashing** refers to the process of transforming any given key or string of characters into another value
A hash function can be used to translate keys (values) to array indices