This repository contains some Hackerrank solutions in C++.
- c++14 compiler
- clang >= 3.4
- gcc >= 4.9
- msvc >= 19 (Visual Studio 2015)
- cmake >= 3.1
- Google Test (GTest) >= 1.7
- Conan (optional for building deps)
cd hackerrank-cpp
mkdir build
cd build
cmake ..
make
First build and then:
make test
Go to project root folder and run setup-new-problem script:
cd hackerrank-cpp
sh scripts/setup-new-problem -n algorithms::implementation::diagonal_difference
This will create the following directory structure:
hackerrank-cpp
|-- src
| |
| +-- algorithms
| |
| +-- implementation
| |
| +-- diagonal_difference
| |-- diagonal_difference.cpp
| |-- diagonal_difference.h
| |-- diagonal_difference_test.cpp
| +-- CMakeLists.txt