/algorithm-labs

algorithm labs

Primary LanguageCMIT LicenseMIT

algo-labs

Most used: go and c++

Developed on Ubuntu 18.04 x64, build on MacOSx could fail.

Prerequisites

git submodule update --init
sudo apt install valgrind

Tips

C++ MemCheck

mkdir build && cd build
cmake -G Ninja ..
ninja
ninja ExperimentalMemCheck

Ninja 中的N一定要大写,vscode -> cmake generator 配置时也要注意首字母大写

或者在 vscode cmake outline 中右键ExperimentalMemCheck执行。

Ninja 失败的话,可以用 Makefile

mkdir build && cd build
cmake ..
make -j$(nproc)
make test
ctest -R ExperimentalMemCheck

Go Tests Coverage

go test -cover
# or
go tool cover -html=cover.out

Editor

VS Code with CMAKE

LICENSE

MIT License