Skip to content
Prabhsimran Singh edited this page Dec 25, 2018 · 14 revisions

C++ Algorithms & Data Structures

C++ Standards Build Status Codacy Badge

These are C++ implementations of various algorithms and data structures optimized and modularized for peak performance and extensibility. This project includes support for C++11 std and can currently only be built on Linux.

Getting Started

You need to have any recent C++ compiler with C++11 support installed on your system along with a few pre-requisites:

The following commands will get you through the installation of the dependencies:

sudo apt-get install libboost-all-dev
sudo add-apt-repository ppa:george-edison55/cmake-3.x
sudo apt-get update
sudo apt-get install cmake

Once you're done with the above installation, you can build the project using CMAKE:

git clone https://github.com/pskrunner14/cpp-algs.git
cd cpp-algs/
./install.sh

Packages

Algorithms Library

Data Structures Library

Documentation

Basic Usage

// simply include a single header file
#include <cpp_algs.hpp>

// ...

// al namespace for algorithms
std::vector<int> v = {541, 12, 56, 62, 1234, 656547, 123, 1}
al::quickSort<int>(v);

// ...

// ds namespace for data structures
ds::Trie t;
t.insertWord("hello");
t.insertWord("world");

References

License

This project is distributed under the MIT License, see LICENSE for more information.