An open API service indexing awesome lists of open source software.

https://github.com/fredericheem/algorithm-interview-cpp

A collection of generic algorithms in C++
https://github.com/fredericheem/algorithm-interview-cpp

Last synced: 5 days ago
JSON representation

A collection of generic algorithms in C++

Awesome Lists containing this project

README

          

A collection of *generic* algorithms in C++ 11, based on the STL library, useful for preparing job interviews...

## Sorting

* Quick Sort
* Bubble Sort
* Insertion Sort
* Selection Sort
* Heap Sort

## Data structures

* Linked List
* Binary Tree
* Array

### Linked List

* creation
* push back element
* size
* clear
* reverse
* delete by value

### Binary Tree

* create
* insert node
* remove node
* clear all nodes
* Breadth first search
* Depth first search

### Array

* intersection

## Graph

* Dijkstra - shortest path

## Algorithm

* Binary Search - non recursive
* Binary Search - recursive

## How to build and run

Build and Run:

$ mkdir build && cd build
$ cmake ..
$ make
$ ctest

## STL

This library uses the following STL algorithms, functions and data structures:

* std::unordered_set
* std::unordered_map
* std::priority_queue
* std::vector
* std::list

* std::next
* std::distance

* std::swap
* std::min_element
* std::sort
* std::is_sorted