This repository contains C++ code for various algorithms. The algorithms implemented here are mainly from computer science and mathematics. These algorithms have been implemented in C++ for educational purposes.
- Sorting algorithms: bubble sort, selection sort, insertion sort, merge sort, quicksort, heapsort.
- Graph algorithms: Breadth-First Search (BFS), Depth-First Search (DFS), Dijkstra's Algorithm, Bellman-Ford Algorithm, Kruskal's Algorithm, Prim's Algorithm.
- Dynamic Programming algorithms: Longest Common Subsequence (LCS), Knapsack Problem, Matrix Chain Multiplication, Edit Distance.
To use these algorithms, simply clone the repository and compile the C++ files using a C++ compiler. Each algorithm is implemented in its own file, making it easy to find and use the specific algorithm you need.
Contributions are welcome! If you have implemented an algorithm in C++ that is not currently included in this repository, feel free to submit a pull request.
git clone https://github.com/patriicke/algos.git
cd algos
g++ sorting/bubble_sort.cpp -o bubble_sort
./bubble_sort