
1. Sorting Algorithms (Essential for Interviews)
- Bubble Sort – Basic sorting algorithm, inefficient for large data.
- Selection Sort – Selects the smallest element and places it in order.
- Insertion Sort – Inserts elements into their correct position.
- Merge Sort – Efficient, divide-and-conquer sorting with O(n log n) complexity.
- Quick Sort – Fast sorting using partitioning, average O(n log n) complexity.
- Heap Sort – Sorting using a heap, used in priority queues.
- Counting Sort – Good for small range of numbers.
- Radix Sort – Used for sorting numbers with multiple digits efficiently.
2. Searching Algorithms
- Linear Search – Basic search, used in unsorted lists.
- Binary Search – Fast O(log n) search, works only in sorted arrays.
- Jump Search – Faster than binary search for sorted data.
- Exponential Search – Good for unbounded lists.
- Interpolation Search – Faster than binary search for uniformly distributed data.
3. Graph Algorithms
- Breadth-First Search (BFS) – Traverses level-by-level, used in shortest path problems.
- Depth-First Search (DFS) – Explores depth before breadth, used in tree/graph traversal.
- Dijkstra’s Algorithm – Finds the shortest path from a source node (greedy approach).
- Bellman-Ford Algorithm – Shortest path with negative weights.
- Floyd-Warshall Algorithm – All-pairs shortest paths.
- Kruskal’s Algorithm – Finds Minimum Spanning Tree (MST) using greedy approach.
- Prim’s Algorithm – Another approach for MST.
- Topological Sorting – Used in DAGs (Directed Acyclic Graphs) like dependency resolution.
4. Tree Algorithms
- Binary Tree Traversal (Inorder, Preorder, Postorder, Level Order BFS)
- Lowest Common Ancestor (LCA) – Finds the common ancestor of two nodes.
- Morris Traversal – In-order traversal without recursion or stack.
- Trie (Prefix Tree) – Used for searching strings efficiently (autocomplete systems).
5. Dynamic Programming & Recursion
- Fibonacci Series (DP & Recursion) – Classic problem for understanding memoization.
- Knapsack Problem (0/1 Knapsack & Fractional Knapsack) – Optimization problem.
- Longest Common Subsequence (LCS) – Used in diff utilities, DNA sequencing.
- Coin Change Problem – Find the minimum number of coins needed for a sum.
- Subset Sum Problem – Determines if a subset sums to a given value.
RELATED POSTS
View all