https://github.com/crafterkolyan/competitive-programming-algorithms
This repository contains algorithms for competitive programming. It was created in order to fix wrong codes on E-maxx.
https://github.com/crafterkolyan/competitive-programming-algorithms
algorithms competitive-programming cpp
Last synced: about 1 year ago
JSON representation
This repository contains algorithms for competitive programming. It was created in order to fix wrong codes on E-maxx.
- Host: GitHub
- URL: https://github.com/crafterkolyan/competitive-programming-algorithms
- Owner: CrafterKolyan
- License: mit
- Created: 2019-03-17T21:25:23.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-06-25T06:12:37.000Z (about 7 years ago)
- Last Synced: 2025-02-11T18:34:02.524Z (over 1 year ago)
- Topics: algorithms, competitive-programming, cpp
- Language: C++
- Homepage:
- Size: 1.39 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Competitive Programming Algorithms
[](https://travis-ci.com/CrafterKolyan/competitive-programming-algorithms)

[](LICENSE)
This repository contains algorithms for competitive programming. It was created in order to fix wrong codes on E-maxx.
## Testing
For now we use googletest (gtest) [v1.8.1](https://github.com/google/googletest/releases/tag/release-1.8.1) as an automatic test system.
Also we use [Travis CI](https://travis-ci.com/) to provide automatic testing of all branches (see tests badge on top).
More info: [cpp/tests/README.md](cpp/tests/README.md)
## Coding Style Convention
We use [Google C++ Style Guide](https://google.github.io/styleguide/cppguide.html)
with some exceptions:
1. **Source files have `.cpp` extension rather than `.cc`**
As this code can be used by beginners and `.cpp` extension is the most popular we don't want to
create additional difficulties in understanding where the code is placed (and why do we use `.cc` extension).
2. **No need to create header (`.h`) files.**
We want to keep structure as simple as possible.
One source file with implementation and one with tests.
It should be possible to copy an implementation and paste it anywhere.
3. **Possibility of including source (`.cpp`) files**
This is due to previous exception.
As the wording is complicated we provide an example:
`#include "../binary_power/binary_power_tests.cpp"`
4. **Identation is 4 spaces instead of 2 spaces**
Code in this repository shouldn't have big nesting inside it.
4 spaces is more often used by beginners than 2 spaces.
Also you can see much clearer where each block of code goes (this is created out of thin air).