Skip to content

devashree-shukla/DSAlgoExpedition

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Algorithm Classification:

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:

1. Comparison-Based Algorithms:

These algorithms sort elements by comparing them with each other. Examples: Bubble Sort, Selection Sort, Insertion Sort, Merge Sort, Quick Sort, Heap Sort.

2. Non-Comparison-Based Algorithms:

These algorithms sort elements without comparing them directly with each other. Examples: Counting Sort, Radix Sort, Bucket Sort.

3. Divide and Conquer Algorithms:

These algorithms divide the problem into smaller subproblems, solve these subproblems independently, and then combine their solutions. Examples: Merge Sort, Quick Sort, Binary Search.

4. Dynamic Programming Algorithms:

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.

5. Greedy Algorithms:

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.

6. Brute Force Algorithms:

These algorithms try every possible solution to find the desired solution. Examples: Linear Search, Travelling Salesman Problem using exhaustive search.

7. Backtracking Algorithms:

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.

8. Randomized Algorithms:

These algorithms make random choices during their execution to achieve good performance on average. Examples: Randomized Quick Sort, Monte Carlo algorithms.

9. Parallel Algorithms:

These algorithms execute multiple operations simultaneously, often using multi-core or multiple processors. Examples: Parallel versions of Merge Sort, Matrix multiplication.

10. Recursive Algorithms:

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.

PlayTime

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

About

My adventure and exploration in learning and practicing data structures and algorithms

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages