https://github.com/binarybeast007/competitive-programming
A collection of data structure, algorithms and templates for competitive programming
https://github.com/binarybeast007/competitive-programming
algorithms competitive-programming cplusplus data-structures templates
Last synced: about 2 months ago
JSON representation
A collection of data structure, algorithms and templates for competitive programming
- Host: GitHub
- URL: https://github.com/binarybeast007/competitive-programming
- Owner: BinaryBeast007
- License: mit
- Created: 2021-07-26T05:50:07.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-01-03T13:50:04.000Z (over 2 years ago)
- Last Synced: 2025-03-25T05:34:44.583Z (2 months ago)
- Topics: algorithms, competitive-programming, cplusplus, data-structures, templates
- Language: C++
- Homepage:
- Size: 113 KB
- Stars: 7
- Watchers: 1
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
Competitive Programming
[](https://github.com/BinaryBeast007/Competitive-Programming/blob/main/CONTRIBUTING.md)

[](https://github.com/BinaryBeast007/Competitive-Programming/fork)
[](https://opensource.org/licenses/mit-license.php)## Overview
The repository is a collection of open-source implementation of a variety of data structures and algorithms for competitive programming implemented in [C++](https://en.wikipedia.org/wiki/C%2B%2B) and licensed under [MIT LICENSE](https://github.com/BinaryBeast007/Competitive-Programming/blob/main/LICENSE "LICENSE"). Source codes are compiled and tested for every commit on [Windows 10](https://www.microsoft.com/en-us/software-download/windows10) & [Ubuntu 20.04](https://ubuntu.com/blog/ubuntu-20-04-lts-arrives).
## What is Competitive Programming?
> Competitive programming is a mind sport usually held over the Internet or a local network, involving participants trying to program according to provided specifications. Contestants are referred to as sport programmers.
> A programming competition generally involves the host presenting a set of logical or mathematical problems, also known as puzzles, to the contestants (who can vary in number from tens to several thousand), and contestants are required to write computer programs capable of solving each problem. Judging is based mostly upon several problems solved and time spent for writing successful solutions.
> \- Wikipedia
## Templates
* [Debug](https://github.com/BinaryBeast007/Competitive-Programming/blob/main/Templates/debug.cpp)
## Data Structures
* Disjoint Set Union
- [By rank](https://github.com/BinaryBeast007/Competitive-Programming/blob/main/Data%20Structures/dsu_by_rank.cpp)
- [By size](https://github.com/BinaryBeast007/Competitive-Programming/blob/main/Data%20Structures/dsu_by_size.cpp)## Dynamic Programming
* [Fibonacci](https://github.com/BinaryBeast007/Competitive-Programming/tree/main/Dynamic%20Programming/Fibonacci "Fibonacci")
* [Knapsack](https://github.com/BinaryBeast007/Competitive-Programming/tree/main/Dynamic%20Programming/Knapsack "Knapsack")
* [Subset Sum](https://github.com/BinaryBeast007/Competitive-Programming/tree/main/Dynamic%20Programming/Subset%20Sum "Subset Sum")
* [Subset Sum Difference](https://github.com/BinaryBeast007/Competitive-Programming/tree/main/Dynamic%20Programming/Subset%20Sum%20Difference "Subset Sum Difference")
* [Equal Sum Partition](https://github.com/BinaryBeast007/Competitive-Programming/tree/main/Dynamic%20Programming/Equal%20Sum%20Partition "Equal Sum Partition")
* [Longest Common Subsequence](https://github.com/BinaryBeast007/Competitive-Programming/tree/main/Dynamic%20Programming/Longest%20Common%20Subsequence "Longest Common Subsequence")## Graph Theory
* [BFS](https://github.com/BinaryBeast007/Competitive-Programming/tree/main/Graph%20Theory/BFS "BFS")
* [DFS](https://github.com/BinaryBeast007/Competitive-Programming/tree/main/Graph%20Theory/DFS "DFS")
* [Cycle Detection](https://github.com/BinaryBeast007/Competitive-Programming/tree/main/Graph%20Theory/Cycle%20Detection "Cycle Detection")
* [Topological Sort](https://github.com/BinaryBeast007/Competitive-Programming/tree/main/Graph%20Theory/Topological%20Sort "Topological Sort")
* [Bipartite Graph Check](https://github.com/BinaryBeast007/Competitive-Programming/tree/main/Graph%20Theory/Bipartite%20Graph%20Check "Bipartite Graph Check")
* [Spanning Tree](https://github.com/BinaryBeast007/Competitive-Programming/tree/main/Graph%20Theory/Spanning%20Tree "Spanning Tree")
* [Shortest Path Algorithms](https://github.com/BinaryBeast007/Competitive-Programming/tree/main/Graph%20Theory/Shortest%20Path%20Algorithms "Shortest Path Algorithms")## Number Theory & Math
* [Binary Exponentiation](https://github.com/BinaryBeast007/Competitive-Programming/tree/main/Number%20Theory%20%26%20Math/Binary%20Exponentiation "Binary Exponentiation")
* [Euclidean Algorithm](https://github.com/BinaryBeast007/Competitive-Programming/tree/main/Number%20Theory%20%26%20Math/Euclidean%20Algorithm "Euclidean Algorithm")
* [Euler's Totient Function](https://github.com/BinaryBeast007/Competitive-Programming/tree/main/Number%20Theory%20%26%20Math/Euler's%20Totient%20Function "Euler's Totient Function")
* [Extended Euclidean Algorithm](https://github.com/BinaryBeast007/Competitive-Programming/tree/main/Number%20Theory%20%26%20Math/Extended%20Euclidean%20Algorithm "Extended Euclidean Algorithm")
* [Integer Factorization](https://github.com/BinaryBeast007/Competitive-Programming/tree/main/Number%20Theory%20%26%20Math/Integer%20Factorization "Integer Factorization")
* [Modular Multiplicative Inverse](https://github.com/BinaryBeast007/Competitive-Programming/tree/main/Number%20Theory%20%26%20Math/Modular%20Multiplicative%20Inverse "Modular Multiplicative Inverse")
* [Sieve of Eratosthenes](https://github.com/BinaryBeast007/Competitive-Programming/tree/main/Number%20Theory%20%26%20Math/Sieve%20of%20Eratosthenes "Sieve of Eratosthenes")## Searching & Sorting
* [Binary Search](https://github.com/BinaryBeast007/Competitive-Programming/tree/main/Searching%20%26%20Sorting/Binary%20Search "Binary Search")
* [Bubble Sort](https://github.com/BinaryBeast007/Competitive-Programming/tree/main/Searching%20%26%20Sorting/Bubble%20Sort "Bubble Sort")
* [Counting Sort](https://github.com/BinaryBeast007/Competitive-Programming/tree/main/Searching%20%26%20Sorting/Counting%20Sort "Counting Sort")
* [Insertion Sort](https://github.com/BinaryBeast007/Competitive-Programming/tree/main/Searching%20%26%20Sorting/Insertion%20Sort "Insertion Sort")
* [Linear Search](https://github.com/BinaryBeast007/Competitive-Programming/tree/main/Searching%20%26%20Sorting/Linear%20Search "Linear Search")
* [Merge Sort](https://github.com/BinaryBeast007/Competitive-Programming/tree/main/Searching%20%26%20Sorting/Merge%20Sort "Merge Sort")
* [Quick Sort](https://github.com/BinaryBeast007/Competitive-Programming/tree/main/Searching%20%26%20Sorting/Quick%20Sort "Quick Sort")
* [Selection Sort](https://github.com/BinaryBeast007/Competitive-Programming/tree/main/Searching%20%26%20Sorting/Selection%20Sort "Selection Sort")## Contributions
Feel free to contribute. Please read the [Contribution Guidelines](https://github.com/BinaryBeast007/Competitive-Programming/blob/main/CONTRIBUTING.md).