https://github.com/jgndev/cpp_dsa_templ
c++ dsa template
https://github.com/jgndev/cpp_dsa_templ
dsa-cpp leetcode-cpp
Last synced: 3 months ago
JSON representation
c++ dsa template
- Host: GitHub
- URL: https://github.com/jgndev/cpp_dsa_templ
- Owner: jgndev
- License: bsd-3-clause
- Created: 2024-08-15T12:45:45.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-09-04T15:55:00.000Z (9 months ago)
- Last Synced: 2025-02-28T12:08:36.172Z (4 months ago)
- Topics: dsa-cpp, leetcode-cpp
- Language: Shell
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# DSA C++ Template
This repo is for quickly setting up a C++ project that uses [CMake](https://cmake.org) and [GoogleTest](https://google.github.io/googletest/).
It is intended for practice with the C++ language while doing Data Structures and
Algorithms problems like those found on [leetcode.com](https://leetcode.com)## Instructions
1 - Clone the repo to a directory name of your choice.
```bash
git clone https://github.com/jgndev/dsa_cpp_templ example_problem
```2 - Run the project init script `project-init.sh`
```bash
./project-init.sh
```This creates a `build` directory and links `compile-commands.json` to the top level which
helps LSPs work in editors like [neovim](https://neovim.io).## Building
1 - Change directory into `build`
2 - Run `make`
## Running tests
1 - Add your tests to `tests/test_solution.cpp`
2 - Change directory to `build`
3 - Run `make` to compile `test_solution`
4 - Run `./test_solution` to run the tests.