Skip to content

Helland369/Algorithms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Algorithms

Table of Contents

About

This is a simple C++ console application designed to implement and demonstrate various fundamental algorithms. It serves as a learning tool to understand algorithmic concepts and their performance characteristics.

Dependencies

Install Catch2

Go to this page download the catch_amalgamated.cpp and catch_amalgamated.hpp.

Make a directory called "external" inside the project directory:

cd Algorithms
mkdir external

Now copy the downloaded files (catch_amalgamated.cpp and catch_amalgamated.hpp) into the "external" directory inside the project directory.

Installation

Clone this repository:

git clone https://github.com/Helland369/Algorithms.git

cd into the project directory:

cd Algorithms

run cmake:

cmake -G Ninja -S . -B build

cd build:

cd build

run ninja inside the build directory:

ninja

run the program:

./algorithms

run the test:

./tests

Algorithms

Name Big O notation
Bubble sort O(n²)
Merge sort O(n*log(n))
Quick sort O(n log n) or O(n^2)
Binary search O(log n)
Jump search O(sqrt n)
Knuth-Morris-Pratt O(n + m)
Rabin-Karp O((n-m+1)m)
SHA256 O1 or On

About

I'm learning Algorithms & Big O notation and write it in C++

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published