Skip to content

Data Structures Types.

Linear

Data Structure Types Operation Types Real-time Examples
Array Fixed-size, Dynamic Array Access, Insert, Delete (fixed size) 1. Days in a week: ["Mon", "Tue", ...]
2. Temperature readings: [72, 68, ...]
Linked List Single, Doubly, Circular Access, Insert, Delete in Head (First Item) 1. Music playlist (each song to the next)
Access, Insert, Delete in Tail (Last Item) 2. Treasure hunt (each clue to the next location)
Access, Insert, Delete in Middle Node
Search for a Value
Stack Array-based, Linked List-based Push, Pop, Peek 1. Pile of plates (last on, first off)
2. Undo in software (last action reversed first)
Queue Simple Queue, Circular Queue, Priority Queue Enqueue, Dequeue, Peek 1. Line at a bank counter
2. Call center queue

Non Linear

Data Structure Types Operation Types Real-time Examples
Tree Binary Tree, AVL Tree, Red-Black Tree Insert, Delete, Traversal 1. Organizational chart of a company
B-Tree, Binary Search Tree, N-ary Tree 2. Family tree showing genealogical relationships
Graph Directed, Undirected, Weighted Add/Remove Vertex, Add/Remove Edge, Search, Path Finding 1. Road network (intersections and roads)
Graph, Tree, Acyclic Graph 2. Facebook's friend network
Heap Binary Heap, Fibonacci Heap Insert, Delete, Find Max/Min 1. Priority scheduling (higher priority first)
Min Heap, Max Heap 2. Finding the largest/smallest element quickly
Hash Table Chaining, Open Addressing Insert, Delete, Access 1. Book indexing (word and page number)
Linear Probing, Quadratic Probing 2. User info on website by username
Set Hash Set, Tree Set Add, Remove, Contains 1. Unique collection of items (tags in a blog)
2. Filtering duplicates from a list
Trie Basic Trie, Compressed Trie Insert, Search, Delete 1. Auto-complete in search engines
Radix Trie, Suffix Trie 2. Spell checker in word processors