Comprehensive list of data structures in DSA
Here’s a comprehensive list of data structures in DSA (Data Structures and Algorithms), organized by category:
1. Linear Data Structures
Elements are arranged sequentially.
| Data Structure | Description | Example / Use |
|---|---|---|
| Array | Fixed-size collection of elements | Store list of numbers |
| Linked List | Elements (nodes) connected via pointers | Dynamic memory usage, insertion/deletion |
| Doubly Linked List | Nodes with next and previous pointers | Browser history, undo functionality |
| Circular Linked List | Last node points to first | Round-robin scheduling |
| Stack | LIFO (Last In First Out) | Undo operations, recursion stack |
| Queue | FIFO (First In First Out) | Task scheduling |
| Deque | Double-ended queue, insert/delete both ends | Sliding window, deque in Java |
| Priority Queue / Heap | Elements with priorities | Task scheduling, Dijkstra’s algorithm |
2. Non-Linear Data Structures
Elements are connected in a hierarchy or graph.
| Data Structure | Description | Example / Use |
|---|---|---|
| Tree | Hierarchical structure with nodes | File system, expression trees |
| Binary Tree | Each node has max 2 children | General-purpose tree |
| Binary Search Tree (BST) | Left < Node < Right | Fast search, insert, delete |
| AVL Tree | Self-balancing BST | Keep operations O(log n) |
| Red-Black Tree | Balanced BST using color rules | Used in TreeMap/TreeSet |
| B-Tree / B+ Tree | Balanced multi-way tree | Database indexing |
| Trie (Prefix Tree) | Stores strings efficiently | Autocomplete, dictionary |
| Heap (Binary Heap) | Complete binary tree, min/max heap | Priority queues |
3. Hash-Based Data Structures
Store data with key-based access.
| Data Structure | Description | Example / Use |
|---|---|---|
| Hash Table / Hash Map | Key-value storage using hash function | Lookup in O(1) avg |
| Hash Set | Stores unique elements | Remove duplicates |
| Hash Multimap | Allows multiple values per key | Grouping by category |
4. Graphs
Collections of nodes (vertices) and edges.
| Type | Description | Example / Use |
|---|---|---|
| Graph | General graph | Social networks |
| Directed / Undirected Graph | Edge direction matters or not | Dependencies / connections |
| Weighted / Unweighted Graph | Edges have weights or not | Shortest path, MST |
| Adjacency Matrix / List | Graph representation | Efficient traversal |
| Tree as Graph | Special graph without cycles | Hierarchies |
5. Advanced / Specialized Structures
| Data Structure | Description | Example / Use |
|---|---|---|
| Segment Tree | Range queries and updates | Sum, min, max in subarray |
| Fenwick Tree / Binary Indexed Tree | Efficient prefix sums | Range queries, competitive programming |
| Disjoint Set / Union-Find | Track connected components | Kruskal’s MST algorithm |
| Skip List | Probabilistic sorted list | Alternative to balanced BST |
| Circular Buffer | Fixed-size buffer in a loop | Streaming data, producer-consumer |
| Bloom Filter | Probabilistic membership checking | Caches, databases |
| LRU Cache | Least Recently Used eviction | Cache eviction in OS / DB |
Published on: Oct 05, 2025, 08:44 AM