This repository contains solutions of common data processing algorithms and data structures.
Repository has several directories with solutions for certain algorithm classes. These directories are:
-
Directory contains header file with the definition of several sorting algorithms. Templated implementation is in .tpp file. There are sorting:
- bubble
- selection
- insertion
- cocktail
- quick (Hoare)
And some comparators to set the sorting order.
-
There are common algorithms, based on Graphs. Algorithms implemented:
- Dijkstra method of finding shortest paths.
-
- Hash Table with open addressing
- Hash Table with separate chaining
-
- Huffman algorithm
You can use these solutions in several ways:
-
Just copy the source code of needed methods.
-
Clone the whole repo to your computer:
git clone https://github.com/MatheMateCS/Algorithms
Create main.cpp in root directory, include in it appropriate headers from directories:
#include "Sorting/sorting.h" int main() { bubbleSort(); }
And then build the project with cmake builder, for example create CMakeLists.txt:
cmake_minimum_required(VERSION 3.29) project(Algorithms) set(CMAKE_CXX_STANDARD 14) add_executable(Algorithms Sorting/sorting.h Sorting/sorting.tpp main.cpp )