Loading repository data…
Loading repository data…
H0NEYP0T-466 / repository
⚡ Comprehensive collection of Design & Analysis of Algorithms 🚀 | Includes 🧮 Sorting, 💡 Dynamic Programming, 🎯 Greedy, 🌐 Graph, and 🔤 String Matching | Implemented in ⚙️ C++ with STL | Perfect for 🎓 students & 👨💻 developers exploring algorithmic problem-solving ✨
A comprehensive collection of Design and Analysis of Algorithms implementations in C++. This repository contains efficient implementations of fundamental algorithms across various categories including sorting, dynamic programming, greedy algorithms, graph algorithms, and string matching techniques.
Clone the repository
git clone https://github.com/H0NEYP0T-466/DAA.git
cd DAA
Compile any algorithm
# Example: Compile Shell Sort
g++ -o shell_sort Shell_sort.cpp
# Example: Compile Dynamic Programming algorithms
g++ -o knapsack Dynamic_progrmaing/01Knapsack_dp_bottom_up.cpp
# Example: Compile Greedy algorithms
g++ -o huffman greedy_algorithms/huffman_coding.cpp
Run the executable
./shell_sort
./knapsack
./huffman
Each algorithm can be compiled and executed independently:
# Sorting Algorithms
g++ -o bucket_sort Bucket_sort.cpp && ./bucket_sort
g++ -o counting_sort Counting_Sort.cpp && ./counting_sort
g++ -o radix_sort Radix_sort.cpp && ./radix_sort
# Dynamic Programming
g++ -o lcs Dynamic_progrmaing/lcs_dp_bottom_up.cpp && ./lcs
g++ -o mcm Dynamic_progrmaing/mcm_dp_bottom_up.cpp && ./mcm
# Greedy Algorithms
g++ -o kruskal greedy_algorithms/kruskal's_algorithm.cpp && ./kruskal
g++ -o fractional_knapsack greedy_algorithms/fractional_knapsack.cpp && ./fractional_knapsack
# String Matching
g++ -o kmp "string_matching(knutt_morris_pratt(kmp) algo ).cpp" && ./kmp
g++ -o rabin_karp "string_matching(rabin_carp Algorithm).cpp" && ./rabin_karp
// Example: Using Shell Sort
#include "Shell_sort.cpp"
int main() {
int arr[] = {64, 34, 25, 12, 22, 11, 90};
int n = sizeof(arr)/sizeof(arr[0]);
shellSort(arr, n);
printArray(arr, n);
return 0;
}
DAA/
├── 📄 README.md
├── 📄 LICENSE
├── 📄 CONTRIBUTING.md
├── 🔧 .git/
├──
├── 📊 Sorting Algorithms
│ ├── Shell_sort.cpp
│ ├── Bucket_sort.cpp
│ ├── Counting_Sort.cpp
│ └── Radix_sort.cpp
├──
├── 📁 Dynamic_progrmaing/
│ ├── 01Knapsack_brute_forse.cpp
│ ├── 01Knapsack_dp_bottom_up.cpp
│ ├── 01Knapsack_dp_top_down.cpp
│ ├── fibonacci_series.cpp
│ ├── finding nth number in fibonaci series using dp(bottom up)+space_optimization.cpp
│ ├── finding nth number in fibonaci series using dp(bottom up).cpp
│ ├── finding nth number in fibonaci series using dp(top down).cpp
│ ├── finding nth number in fibonaci series.cpp
│ ├── lcs_dp_bottom_up.cpp
│ ├── lcs_dp_top-down.cpp
│ ├── mcm_brute_forse.cpp
│ ├── mcm_dp_bottom_up.cpp
│ ├── mcm_dp_top_down.cpp
│ └── simple_lcs.cpp
├──
├── 📁 greedy_algorithms/
│ ├── candy_shop _problem.cpp
│ ├── fractional_knapsack.cpp
│ ├── huffman_coding.cpp
│ ├── kruskal's_algorithm.cpp
│ ├── n number of meetings in a room.cpp
│ └── reverse_string.cpp
├──
├── 🌐 Graph Algorithms
│ ├── Floyd_Warshall Algorithm_APSP.cpp
│ ├── single_source_shortestPath_using topological_sort in DAG.cpp
│ ├── topological_sort(bfs) kahn's algorithm.cpp
│ └── topological_sort(dfs).cpp
├──
├── 🔤 String Matching Algorithms
│ ├── string_matching(knutt_morris_pratt(kmp) algo ).cpp
│ ├── string_matching(naive approch).cpp
│ └── string_matching(rabin_carp Algorithm).cpp
└──
└── ⚡ Additional Algorithms
└── Kirchoff's therom.cpp
We welcome contributions! Please see our Contributing Guidelines for details on:
git checkout -b feature/AmazingFeature)git commit -m 'Add some AmazingFeature')git push origin feature/AmazingFeature)This project is licensed under the MIT License - see the LICENSE file for details.
Special thanks to the open-source community and algorithm enthusiasts who contribute to making computer science education accessible to everyone.
Made with ❤️ by H0NEYP0T-466