Types of Algorithms
1. Brute Force Algorithm
Yeh simplest type of algorithm hota hai jo har possible solution ko check karta hai jab tak correct solution na mil jaye.
- Example: Linear search algorithm, jo ek list mein kisi item ko dhundhne ke liye ek-ek karke sabhi elements ko check karta hai.
2. Divide and Conquer Algorithm
Is technique mein ek badi problem ko chhoti-chhoti subproblems mein tod diya jata hai, fir unhe recursively solve kiya jata hai.
- Example: Merge Sort aur Quick Sort algorithms.
3. Greedy Algorithm
Yeh algorithm har step par best possible choice ko select karta hai jo locally optimal hota hai.
- Example: Dijkstra's Algorithm jo shortest path find karne ke liye use hota hai.
4. Dynamic Programming Algorithm
Yeh algorithm complex problems ko solve karne ke liye subproblems ka use karta hai jinka solution store kiya jata hai taaki same calculation baar-baar na ho.
- Example: Fibonacci Series aur Knapsack Problem.
5. Backtracking Algorithm
Yeh algorithm step-by-step decision leta hai aur agar koi decision galat hota hai toh previous step par wapas jaata hai.
- Example: N-Queens Problem aur Sudoku Solver.
6. Randomized Algorithm
Is type ke algorithm mein randomness ka use hota hai solution nikalne ke liye.
- Example: QuickSort (Randomized Pivot Selection).
7. Recursive Algorithm
Is algorithm mein ek function apne aap ko repeat karta hai jab tak base condition satisfy na ho jaye.
- Example: Factorial calculation using recursion.
8. Search Algorithm
Yeh algorithm kisi data structure ya dataset mein particular value dhundhne ke liye use hota hai.
- Example: Binary Search, Linear Search.
9. Sorting Algorithm
Yeh algorithm kisi dataset ke elements ko ek specific order (ascending ya descending) mein arrange karne ke liye use hota hai.
- Example: Bubble Sort, Insertion Sort, Merge Sort.
10. Hashing Algorithm
Yeh algorithm kisi input ko ek unique hash value mein convert karta hai jo efficient searching aur data retrieval mein madad karta hai.
- Example: SHA-256, MD5 hashing algorithms.
11. Graph Algorithm
Yeh algorithms graphs ke nodes aur edges ke upar operations perform karne ke liye use hote hain.
- Example: Breadth-First Search (BFS), Depth-First Search (DFS), Dijkstra's Algorithm.
12. String Matching Algorithm
Yeh algorithms kisi bade text ya string mein ek specific pattern ya substring ko match karne ke liye use hote hain.
- Example: KMP Algorithm, Rabin-Karp Algorithm.
13. Computational Geometry Algorithm
Yeh algorithms geometric problems jaise convex hull, triangulation, aur shortest path nikalne ke liye use hote hain.
- Example: Graham’s scan algorithm, Bentley-Ottmann Algorithm.
14. Machine Learning Algorithm
Yeh algorithms data analysis, pattern recognition aur prediction ke liye use hote hain.
- Example: Decision Tree, Neural Networks, K-Means Clustering.
15. Cryptographic Algorithm
Yeh algorithms data security aur encryption ke liye use hote hain.
- Example: RSA Algorithm, AES Encryption, Diffie-Hellman Key Exchange.
16. Numerical Algorithm
Yeh algorithms mathematical computations aur numerical problems solve karne ke liye use hote hain.
- Example: Gaussian Elimination, Newton-Raphson Method.
17. Parallel Algorithm
Yeh algorithms multiple processors ka use karke computations ko parallelly execute karne ke liye design kiye jate hain.
- Example: MapReduce, Parallel Merge Sort.
18. Approximation Algorithm
Yeh algorithms NP-Hard problems ke liye approximate solutions generate karne ke liye use hote hain.
- Example: Traveling Salesman Problem (TSP) approximation algorithm.
19. Quantum Algorithm
Yeh algorithms quantum computing ke principles ka use karke problems solve karne ke liye design kiye jate hain.
- Example: Shor’s Algorithm (integer factorization), Grover’s Algorithm (search algorithm).
20. Bioinformatics Algorithm
Yeh algorithms biological data analysis, DNA sequencing, aur protein structure prediction ke liye use hote hain.
- Example: BLAST (Basic Local Alignment Search Tool), Smith-Waterman Algorithm.
21. Evolutionary Algorithm
Yeh algorithm natural selection aur genetic principles ka use karke optimization problems solve karne ke liye design kiya jata hai.
- Example: Genetic Algorithm, Ant Colony Optimization.
22. Scheduling Algorithm
Yeh algorithms task scheduling aur CPU scheduling ke liye use kiye jate hain.
- Example: Round Robin, First Come First Serve (FCFS), Shortest Job Next (SJN).
23. Memory Management Algorithm
Yeh algorithms computer memory allocation aur management ke liye use hote hain.
- Example: Paging, Segmentation, Garbage Collection Algorithms.
24. Compression Algorithm
Yeh algorithms data compression ke liye use hote hain jisse storage aur transmission efficient ho jaye.
- Example: Huffman Coding, Run-Length Encoding (RLE), Lempel-Ziv-Welch (LZW).
25. Game Theory Algorithm
Yeh algorithms strategic decision making aur optimization ke liye use hote hain.
- Example: Minimax Algorithm, Alpha-Beta Pruning.
26. Graph Traversal Algorithm
Yeh algorithms kisi graph ke nodes ko traverse karne ke liye use hote hain.
- Example: BFS (Breadth-First Search), DFS (Depth-First Search).
27. Data Mining Algorithm
Yeh algorithms large datasets se useful insights extract karne ke liye use hote hain.
- Example: Apriori Algorithm, Decision Tree, Clustering Algorithms.
28. Network Algorithm
Yeh algorithms computer networks aur communication ke liye use hote hain.
- Example: Link State Routing Algorithm, Distance Vector Routing Algorithm.
29. Pattern Recognition Algorithm
Yeh algorithms pattern detection aur recognition ke liye use hote hain.
- Example: Support Vector Machines (SVM), K-Nearest Neighbors (KNN).
30. Heuristic Algorithm
Yeh algorithms trial-and-error methods ka use karke problem-solving ke liye design kiye jate hain.
- Example: A* Search Algorithm, Hill Climbing Algorithm.