Linear vs non-linear
The notes
Linear data structures
Data elements are arranged in a sequential or consecutive manner.
Characteristics
- Single-level structure
- Sequential traversal (one path)
- Previous and next element connected
Examples
- Array
- Linked list
- Stack (LIFO: push and pop at the same end)
- Queue (FIFO: enqueue at the back, dequeue at the front)
Non-linear data structures
Data elements are not arranged in any sequence; they form hierarchical or complex connections.
Characteristics
- Multi-level structure
- Multiple paths for traversal
- Each element can connect to several other elements
Examples
- Tree (root, parent and child nodes)
- Graph (nodes connected by edges)
Data structures deck
1. Linear vs non-linear
2. Arrays
3. Hashmaps
4. Stacks
5. Queue
6. Linked list
7. Binary tree
8. BST
9. Graphs
10. Heaps
Make them stick
Sign in to see every card full size, tick the ones you've got, come back to the rest later, and keep your own notes on each card.