A collection of Must Know Topics.
Here’s a comprehensive list of common data structures, organized into categories:
- Array
- Fixed-size, contiguous memory allocation.
- Linked List
- Singly Linked List
- Doubly Linked List
- Circular Linked List
- Stack
- Last-In-First-Out (LIFO) principle.
- Queue
- First-In-First-Out (FIFO) principle.
- Circular Queue
- Priority Queue
- Deque (Double-ended Queue)
-
Tree
- Binary Tree
- Binary Search Tree (BST)
- Balanced Trees (e.g., AVL Tree, Red-Black Tree)
- B-Tree
- B+ Tree
- Segment Tree
- Fenwick Tree (Binary Indexed Tree)
- Trie (Prefix Tree)
- N-ary Tree
- Heap
- Min-Heap
- Max-Heap
-
Graph
- Directed Graph
- Undirected Graph
- Weighted Graph
- Unweighted Graph
- Adjacency Matrix
- Adjacency List
- Edge List
- Hash Table (Hash Map)
- Key-value pairs with efficient access.
- Hash Set
- Unordered collection of unique elements.
- Matrix
- 2D array representation.
- Bit Array (Bit Vector)
- Compact representation of boolean values.
- Skip List
- A probabilistic alternative to balanced trees.
- Disjoint Set (Union-Find)
- Efficiently handles dynamic connectivity.
- Bloom Filter
- Probabilistic data structure for membership testing.
- Suffix Tree
- String data structure for substring search.
- Trie (Prefix Tree)
- Used for efficient retrieval of strings.
Sure! Here are additional data structures, along with some variations and specialized forms:
-
Augmented Data Structures
- Structures enhanced with additional information for improved operations.
- Segment Tree with Lazy Propagation: For range queries and updates.
- Interval Tree: For storing intervals and efficiently querying overlapping intervals.
-
K-D Tree
- A space-partitioning data structure for organizing points in a k-dimensional space, useful in multidimensional search.
-
R-Tree
- A tree data structure for spatial access methods, used in databases for spatial data indexing.
-
Quad Tree
- A tree data structure in which each internal node has four children, used for partitioning a two-dimensional space.
-
Octree
- Similar to a quad tree, but for three-dimensional space, useful in 3D graphics and spatial indexing.
-
Directed Acyclic Graph (DAG)
- A directed graph with no cycles, often used for scheduling and dependency resolution.
-
Planar Graph
- A graph that can be drawn on a plane without edges crossing.
-
Weighted Directed Graph
- A graph where edges have weights, often used in shortest path algorithms.
-
Network Flow Graph
- A directed graph used for flow problems, where each edge has a capacity.
-
Self-balancing Binary Search Trees
- Splay Tree: Self-adjusting binary search tree.
- Treap: Combines binary search tree and heap properties.
- AA Tree: A form of balanced binary tree with a simplified balancing mechanism.
-
Skip Graph
- A probabilistic data structure for maintaining a sorted list of elements that allows fast search and insertion.
-
Sparse Table
- A data structure that allows answering range queries in constant time after preprocessing.
-
Fibonacci Heap
- A data structure for priority queue operations with better amortized time complexity for certain operations.
-
Van Emde Boas Tree
- A tree structure that provides fast operations for integer keys, particularly useful for a bounded universe.
-
Count-Min Sketch
- A probabilistic data structure for estimating the frequency of events in a data stream.
-
DataFrame
- A tabular data structure used primarily in data analysis and manipulation (e.g., in Pandas for Python).
-
Suffix Array
- An array of the starting indices of suffixes of a string, useful for efficient string processing.
-
Ternary Search Tree
- A trie-like data structure that can efficiently store strings and supports prefix-based searching.
-
Spatial Hashing
- A technique for efficiently storing and querying spatial data by mapping coordinates to hash values.
-
Bounding Volume Hierarchies (BVH)
- A tree structure used in computer graphics for ray tracing and collision detection.
-
Point Quadtree
- A variant of quad tree used for efficiently storing points in a 2D space.
-
Binary Indexed Tree (Fenwick Tree)
- A tree structure that provides efficient methods for cumulative frequency tables.
-
Patricia Trie
- A space-optimized trie for storing a dynamic set or associative array where the keys are usually strings.
-
Segment Tree with Dynamic Size
- A segment tree that can adapt its size based on the input.
Here’s a comprehensive combined list of common algorithms organized into various categories, including both basic and advanced algorithms:
- Comparison-Based Sorting
- Bubble Sort
- Selection Sort
- Insertion Sort
- Merge Sort
- Quick Sort
- Heap Sort
- Shell Sort
- Tim Sort
- Non-Comparison-Based Sorting
- Counting Sort
- Radix Sort
- Bucket Sort
- Adaptive Sorting Algorithms
- Smoothsort
- Bead Sort
- Gnome Sort
- Comb Sort
- Distribution Sort
- Flashsort
- Pigeonhole Sort
- Stooge Sort
- Linear Search
- Binary Search
- Ternary Search
- Exponential Search
- Interpolation Search
- Jump Search
- Fibonacci Search
- Graph Search Variants
- Depth-First Search (DFS)
- Breadth-First Search (BFS)
- Uniform Cost Search
- Bidirectional Search
- Heuristic Search
- Best-First Search
- Hill Climbing Search
- Simulated Annealing
- Traversal Algorithms
- Depth-First Search (DFS)
- Breadth-First Search (BFS)
- Shortest Path Algorithms
- Dijkstra's Algorithm
- Bellman-Ford Algorithm
- Floyd-Warshall Algorithm
- A* Search Algorithm
- Minimum Spanning Tree Algorithms
- Prim's Algorithm
- Kruskal's Algorithm
- Reverse-Delete Algorithm
- Flow Algorithms
- Ford-Fulkerson Method
- Edmonds-Karp Algorithm
- Dinic's Algorithm
- Cycle Detection Algorithms
- Floyd-Warshall Cycle Detection
- Union-Find Algorithm (Disjoint Set)
- Topological Sorting
- Graph Coloring
- Connected Components
- Knapsack Problem
- Longest Common Subsequence
- Longest Increasing Subsequence
- Fibonacci Sequence
- Matrix Chain Multiplication
- Coin Change Problem
- Edit Distance
- Traveling Salesman Problem (TSP)
- Job Scheduling Problem
- Bin Packing Problem
- Palindrome Partitioning
- Activity Selection Problem
- Huffman Coding
- Minimum Spanning Tree
- Prim's Algorithm
- Kruskal's Algorithm
- Job Sequencing Problem
- Fractional Knapsack Problem
- Coin Change (Greedy vs. Dynamic Programming)
- N-Queens Problem
- Sudoku Solver
- Rat in a Maze
- Hamiltonian Cycle
- Subset Sum Problem
- Generating Permutations
- Generating Combinations
- Graph Coloring Problems
- Word Search Problems
- Merge Sort
- Quick Sort
- Binary Search
- Strassen's Algorithm for Matrix Multiplication
- Convex Hull Algorithms
- Graham's Scan
- Jarvis March
- Fast Fourier Transform (FFT)
- Karatsuba Algorithm for Fast Multiplication
- Greatest Common Divisor (GCD)
- Least Common Multiple (LCM)
- Sieve of Eratosthenes (Prime Number Generation)
- Fermat's Little Theorem
- Fast Exponentiation
- Monte Carlo Method
- Number Theory Algorithms
- Pollard's Rho Algorithm (for Factorization)
- Miller-Rabin Primality Test
- Chinese Remainder Theorem
- Lucas Sequence
- Knuth-Morris-Pratt (KMP) Algorithm
- Rabin-Karp Algorithm
- Boyer-Moore Algorithm
- Longest Common Substring
- Suffix Array and Suffix Tree
- Trie Data Structure
- Pattern Matching Algorithms
- Aho-Corasick Algorithm
- Z Algorithm
- String Distance Algorithms
- Levenshtein Distance
- Jaro-Winkler Distance
- Binary Tree Traversals
- Balanced Tree Operations (AVL, Red-Black Tree)
- Hashing Techniques
- Heap Operations (Min-Heap, Max-Heap)
- Segment Trees
- Range Queries
- Lazy Propagation
- Fenwick Tree (Binary Indexed Tree)
- Splay Trees
- Skip Lists
- K-D Trees (for multidimensional data)
- Linear Regression
- Logistic Regression
- Decision Trees
- Random Forests
- Support Vector Machines (SVM)
- K-Means Clustering
- Neural Networks
- Gradient Descent Algorithms
- Ensemble Methods
- Bagging (e.g., Bootstrap Aggregating)
- Boosting (e.g., AdaBoost, XGBoost)
- Clustering Algorithms
- Hierarchical Clustering
- DBSCAN (Density-Based Spatial Clustering of Applications with Noise)
- Dimensionality Reduction Algorithms
- Principal Component Analysis (PCA)
- t-Distributed Stochastic Neighbor Embedding (t-SNE)
- Flood Fill Algorithm
- Cache Algorithms
- Least Recently Used (LRU)
- Least Frequently Used (LFU)
- Networking Algorithms
- Dijkstra's Algorithm (for routing)
- Bellman-Ford Algorithm (for routing)
- Simulation Algorithms
- Discrete Event Simulation
- Markov Chain Monte Carlo (MCMC)
- Symmetric Key Algorithms
- AES (Advanced Encryption Standard)
- DES (Data Encryption Standard)
- Asymmetric Key Algorithms
- RSA (Rivest-Shamir-Adleman)
- Diffie-Hellman Key Exchange
- Hash Functions
- SHA (Secure Hash Algorithms)
- MD5 (Message-Digest Algorithm 5)
- Image Processing Algorithms
- Canny Edge Detection
- Hough Transform
- Feature Detection Algorithms
- SIFT (Scale-Invariant Feature Transform)
- SURF (Speeded Up Robust Features)
- Pathfinding Algorithms
- A* Algorithm
- Dijkstra’s Algorithm
- AI Algorithms
- Minimax Algorithm
- Alpha-Beta Pruning
- Vertex Cover Problem
- Set Cover Problem
- Traveling Salesman Problem (TSP) Approximation
- Leader Election Algorithms
- Consensus Algorithms
- Paxos
- Raft
- MapReduce Framework Algorithms
- Two Pointer
- Sliding Window
- Prefix Sum
- Kadane’s Algorithm
- Dutch National Flag
- XOR Patterns
- Combination Sum
- Pattern Matching
- Two Pointer for Strings
- Sliding Window for Strings
- Longest Palindromic Substring
- String Compression
- Anagram Checking
- Fast and Slow Pointers
- Reversal of a Linked List
- Merge Two Sorted Lists
- Cycle Detection
- Remove N-th Node from End
- Intersection of Two Linked Lists
- Depth-First Search (DFS)
- Breadth-First Search (BFS)
- Level Order Traversal
- Lowest Common Ancestor
- Tree Traversal Patterns (Inorder, Preorder, Postorder)
- Serialize and Deserialize a Binary Tree
- Binary Tree Maximum Path Sum
- Depth-First Search (DFS)
- Breadth-First Search (BFS)
- Topological Sort
- Dijkstra’s Algorithm
- Floyd-Warshall Algorithm
- Kruskal’s Algorithm
- Prim’s Algorithm
- Connected Components
- Cycle Detection in Graphs
- 1D DP (Fibonacci, Climbing Stairs)
- 2D DP (Knapsack, Longest Common Subsequence)
- Memoization
- Tabulation
- Optimal Substructure
- Coin Change Problem
- Palindrome Partitioning
- N-Queens Problem
- Permutations and Combinations
- Subset Sum Problem
- Sudoku Solver
- Word Search
- Generate Parentheses
- Activity Selection
- Huffman Coding
- Fractional Knapsack Problem
- Job Sequencing Problem
- Minimum Spanning Tree (Prim’s and Kruskal’s)
- Coin Change (Greedy vs. Dynamic Programming)
- Merge Sort
- Quick Sort
- Binary Search
- Matrix Multiplication
- Closest Pair of Points
- Finding K-th Largest Element
- Producer-Consumer
- Observer
- Active Object
- Thread Pool
- Read-Write Lock
- Barrier
- Fork-Join
- Model-View-Controller (MVC)
- Microservices
- Event-Driven Architecture
- Service-Oriented Architecture (SOA)
- Layered Architecture
- Client-Server Architecture
- Publish-Subscribe
- Caching
- Rate Limiting
- Throttling
- Event Sourcing
- Command Query Responsibility Segregation (CQRS)
- Repository Pattern
- Dependency Injection
- Sieve of Eratosthenes
- Euclidean Algorithm
- Fast Exponentiation
- Monte Carlo Method
- Combinatorial Patterns
- Client-Server Model
- Load Balancing
- Circuit Breaker
- API Gateway