A collection of C++ source code for popular coding platforms like Leetcode, Hackerrank, etc
- Solutions are in the lib folder and tests in the test folder. One file per solution.
- To build only, enter
bazel build ...
or use the provided build script. - To build and execute the tests in the test folder, enter
bazel test ... --test_output=all
or use provided test script.
-
When running on systems where you need to specify the exact C++ compiler version, you can add
--cxxopt=-std=c++17
e.g.- Build Only:
bazel build ... --cxxopt=-std=c++17
- Build and Run Test:
bazel test ... --cxxopt=-std=c++17 --test_output=all
- Build Only:
-
If you're on *nix type system and want to run valgrind, you can do it against the test:
valgrind bazel-bin/test/tests