This repository is a practical collection of various data structures that I've put together through my studies. It provides a good mix of both basic and complex data structures. The repository also includes several easy-to-understand presentation functions. These let me get a hands-on feel of these data structures, using own examples to truly grasp how they work. What's more, parts of this code can be easily adjusted to fit into other projects.
- any C++ compiler
- cmake - optionally
Most of the structures are implemented as templates inside their own headers, so they can be easily linked statically to any project. To do so, simply copy one of the headers into your project's directory and include it inside your sources.
Firstly, clone the repository:
git clone https://github.com/Jlisowskyy/Data-Structures-Collection ; cd Data-Structures-CollectionSimple compilation, for example, with gcc compiler:
g++ -O3 -std=c++20 main.cpp src/* -o MyProgram.exeOr use cmake:
cmake CMakeLists.txt ; makeProgress in this repository may be slower due to demanding university duties. However, plans include the incorporation of the following structures and algorithms:
- Sorting algorithms:
- Quick Sort for lists and arrays
- Merge Sort and modification
- Insertion and Selection sorts
- Shell Sort
- Intro Sort
- Priority queues:
- Simple array-based heap
- Binary array-based heap - beap
- Leftist heap
- Binomial Queue
- Fibonacci heap
- Pairing heap
- Dictionaries:
- Dynamic Perfect Hashing - chain hashing with plain hashmaps inside the buckets
- Chain hashing with list buckets
- BST-Tree
- Splay-Tree
- AVL Tree
- Red-Black Tree
- Positional search trees:
- RST tree
- TRIE tree
- PATRICIA tree
The Last three are already implemented, but not using templates, so I didn't mark them.
Distributed under the MIT License. See LICENSE.txt for more information.