- Binary Search
- QuickSort
- Merge Sort
- Bubble Sort
- Insertion Sort
- Selection Sort
- Depth-First Search (DFS)
- Breadth-First Search (BFS)
- Dijkstra’s Algorithm
- Bellman-Ford Algorithm
- Floyd-Warshall Algorithm
- Binary Tree Traversal (In-order, Pre-order, Post-order)
- A* Algorithm
- Knapsack Problem (Dynamic Programming)
- Dynamic Programming (e.g., Fibonacci Sequence)
- Hashing (e.g., Hash Tables)
- Kruskal’s Algorithm
- Prim’s Algorithm
- Bresenham’s Line Algorithm
- KMP Algorithm
- Rabin-Karp Algorithm
- Maximum Subarray Sum (Kadane’s Algorithm)
- Topological Sorting
- Ford-Fulkerson Algorithm (Max Flow)
- Monte Carlo Algorithm
1.DFS,BFS 2.Dynamic programming 3.Backtracking 4.Sliding window 5.Top k elements 6.PrefixSum
#important qn to ace b4 interview
- Reverse a linked list.
- Find the middle element of a linked list.
- Implement a stack using arrays/linked list.
- Implement a queue using arrays/linked list.
- Find the factorial of a number using recursion.
- Implement binary search in an array.
- Find the largest/smallest element in an array.
- Implement merge sort.
- Implement quick sort.
- Detect a cycle in a linked list.
- Find the intersection point of two linked lists.
- Check if a binary tree is a binary search tree (BST).
- Print all leaf nodes of a binary tree.
- Reverse a binary tree.
- Find the height of a binary tree.
- Implement depth-first search (DFS) on a graph.
- Implement breadth-first search (BFS) on a graph.
- Check if a graph is connected.
- Implement Dijkstra's algorithm for shortest path.
- Implement Prim's algorithm for minimum spanning tree.
- Implement Kruskal's algorithm for minimum spanning tree.
- Find the longest common subsequence of two strings.
- Find the longest increasing subsequence of an array.
- Implement the Knuth–Morris–Pratt (KMP) algorithm for string matching.
- Implement the Rabin-Karp algorithm for string matching.
- Check if a string is a palindrome.
- Check if two strings are anagrams of each other.
- Find the next greater element in an array.
- Find the kth smallest/largest element in an array.
- Find the median of two sorted arrays.
- Implement a trie (prefix tree).
- Find all subsets of a set.
- Find all permutations of a string.
- Implement the Josephus Problem.
- Implement an LRU (Least Recently Used) Cache.
- Find the longest palindrome substring in a string.
- Implement a priority queue.
- Implement a hashmap (dictionary).
- Count the number of inversions in an array.
- Find the shortest path in a maze.