Algorithms can be classified into several types based on different criteria, such as their approach to solving problems or their operational methodology. Here's a broad categorization, including both comparison-based and non-comparison-based algorithms, along with other types:
These algorithms sort elements by comparing them with each other. Examples: Bubble Sort, Selection Sort, Insertion Sort, Merge Sort, Quick Sort, Heap Sort.
These algorithms sort elements without comparing them directly with each other. Examples: Counting Sort, Radix Sort, Bucket Sort.
These algorithms divide the problem into smaller subproblems, solve these subproblems independently, and then combine their solutions. Examples: Merge Sort, Quick Sort, Binary Search.
These algorithms solve problems by breaking them down into simpler subproblems and storing the results of these subproblems to avoid redundant computations. Examples: Fibonacci number calculation, Knapsack problem, Shortest path problem by Bellman-Ford.
These algorithms make the locally optimal choice at each stage with the hope of finding a global optimum. Examples: Kruskal’s and Prim’s algorithm for Minimum Spanning Tree, Dijkstra’s algorithm for Shortest Path.
These algorithms try every possible solution to find the desired solution. Examples: Linear Search, Travelling Salesman Problem using exhaustive search.
These algorithms involve searching for a solution by trying out different solutions and abandoning a solution as soon as it is determined that the solution is not viable. Examples: N-Queens problem, Sudoku solver, Permutations and combinations.
These algorithms make random choices during their execution to achieve good performance on average. Examples: Randomized Quick Sort, Monte Carlo algorithms.
These algorithms execute multiple operations simultaneously, often using multi-core or multiple processors. Examples: Parallel versions of Merge Sort, Matrix multiplication.
These algorithms solve the base case directly and then solve larger problems by calling themselves with simpler inputs. Examples: Binary Search, Quick Sort, Tree Traversals. Each type of algorithm has its unique characteristics and is chosen based on the specific requirements and constraints of the problem at hand. Understanding these different types of algorithms is crucial for computer science students and professionals, as it broadens the range of tools available for problem-solving.
Algorithm Visualization - https://www.cs.usfca.edu/~galles/visualization/
Algorithms in Swift - https://github.com/devashree-shukla/swift-algorithm-club/tree/master
Youttube channel - https://www.youtube.com/playlist?list=PLxCzCOWd7aiHcmS4i14bI0VrMbZTUvlTa