Brute Force Algorithms
How it works: The most straightforward approach. It tries every possible option to find a solution,
without optimizing for speed.
Best used for: Simple tasks or finding any baseline solution before optimization.
Example: Sequential/linear search (checking a list one by one until the target is found).
Medium
·Vinod Borole
+1
2. Divide and Conquer Algorithms
How it works: Breaks a problem into smaller, independent sub-problems, solves each sub-problem
recursively, and then combines the results.
Best used for: Sorting data or performing efficient searches.
Example: Binary Search or Merge Sort.
GeeksforGeeks
+4
3. Greedy Algorithms
How it works: Makes the choice that looks the best at the exact current moment, hoping this "local"
best will eventually lead to the "global" best.
Best used for: Optimization and pathfinding problems.
Example: Dijkstra's Algorithm for finding the shortest path on a map.
GeeksforGeeks
+4
4. Dynamic Programming (DP)
How it works: Breaks a complex problem into overlapping sub-problems, solves them, and stores
(memoizes) the results so you never have to calculate the same thing twice.
Best used for: Maximizing efficiency when similar calculations are repeated.
Example: The Fibonacci sequence or the Knapsack problem.
GeeksforGeeks
+1
5. Backtracking Algorithms
How it works: Builds a solution step-by-step. If at any point it realizes that the path won't lead to a valid
solution, it abandons it and "backtracks" to try a different path.
Best used for: Puzzles, maze-solving, and combinatorial problems.
Example: Solving a Sudoku puzzle or the N-Queens problem.
YouTube
·TimesPro
+4
6. Recursive Algorithms
How it works: Solves a problem by calling a simpler version of itself over and over again until it reaches a
baseline "base case".
Best used for: Tree and graph traversals.
Example: Factorials (e.g., n! = n × (n-1)!).
Medium
·Vinod Borole
+4
7. Randomized Algorithms
How it works: Uses a random number generator to determine the next step or input during the decision-
making process.
Best used for: Complex problems where finding an exact deterministic solution takes too long.
Example: Randomized Quick Sort or Monte Carlo methods.
Indian Institute of Science
+4