The repository contains implementations of different data structures and algorithms in C/C++. They are intended to be used as educational examples.
The examples are grouped in directories, by topic, as follows:
A simple demonstration of the effects of locality on performance.
- Simple - A simple, C-style implementation
- DynamicArray - An object-oriented implementation. Also demonstrates proxies, operator ovearloading.
Contains implementations of separate chaining and linear probing hashes
Demonstrates breadth-first and depth-first searching over a square, chess-like board.
An implementation of a linked list
- Sorting - Implementations of the most popular sorting algorithms. Also includes unit tests.
- merge-sort-simple-2016.cpp - a very simple (50 lines) merge sort
- merge-sort-linked-list.cpp - generic merge sort over templated linked ist
- merge-sort-static-list.cpp - merge sort on static list (not so smart implementation)
- Stack - contains static, fixed size and linked implementations of a stack.
- StackTest - demonstrates the use of unit tests, using a custom unit test framework.
- combinations-2016.cpp - gen all combinations of N elements K class
- huffman-modernist.2016.cpp - brief huffman coding w/C++11 stuff in it
- maze-recursive.2016.cpp - walking a maze in plain C
- fsm-simple.stl-2016.cpp - some C++11 magic put to work into simple Finite State Automata