Header only C++20 library of Data Structures & Algorithms written mainly for self-education.
Require: GoogleTest (gtest)
To make clean build & run tests:
./scripts/build.sh clean ctest
To make cleaner build (for edge cases) & run tests:
./scripts/build.sh cleaner ctest
Ninja (build system) is optional: change Generator -G Ninja in the above build script.
CMakeLists.txt
that uses wndxlib
can look like this:
project(project_1337)
include(FetchContent)
FetchContent_Declare(
wndxlib # v0.0.1.0-rc1
URL https://github.com/WANDEX/algorithms/releases/download/v0.0.1.0-rc1/wndxlib-src.zip
)
FetchContent_MakeAvailable(wndxlib)
add_executable(project_1337)
target_sources(project_1337 PRIVATE main.cpp)
target_link_libraries(project_1337 PRIVATE wandex::wndx)
include/
└── wndx/
├── ds/
│ ├── binary_indexed_tree/
│ │ └── BITreeRQPU.hpp ( BITreeRQPU.t.cpp )
│ ├── binary_search_tree/
│ │ ├── BSTuptr.hpp ( BSTuptr.t.cpp )
│ │ ├── BSTuptrIterator.hpp
│ │ └── BSTuptrNode.hpp
│ ├── linked_list/
│ │ └── DLLraw.hpp ( DLLraw.t.cpp )
│ ├── queue/
│ │ ├── IQueue.hpp
│ │ └── ListQueue.hpp ( ListQueue.t.cpp )
│ ├── queue_priority/
│ │ └── BinaryHeapQ.hpp ( BinaryHeapQ.t.cpp )
│ ├── stack/
│ │ ├── IStack.hpp
│ │ └── ListStack.hpp ( ListStack.t.cpp )
│ └── union_find/
│ └── UnionFind.hpp ( UnionFind.t.cpp )
└── sort/
├── bubble_sort.hpp ( sort.t.cpp )
├── insertion_sort.hpp ( sort.t.cpp )
├── merge_sort.hpp ( sort.t.cpp )
├── quick_sort.hpp ( sort.t.cpp )
└── selection_sort.hpp ( sort.t.cpp )
DSA implemented in Java,
repository contains many useful things: code, tests, slides, references,
videos.
Huge respect to William Fiset
for the gratuitous dissemination of knowledge.