Skip to content

About

A personal competitive programming code library containing reusable templates, algorithms, data structures, utility functions, and commonly used code snippets for contests and problem solving.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

Competitive Programming Code Library

A personal collection of reusable competitive programming code templates, algorithms, data structures, and utility functions that I frequently use while solving problems and participating in programming contests.

This repository is designed as a quick reference and code library to help reduce implementation time during contests.


Purpose

The main purpose of this repository is to maintain commonly used competitive programming implementations in one organized place.

It helps me to:

  • Quickly access frequently used code
  • Reduce implementation time during contests
  • Reuse tested algorithms and data structures
  • Maintain commonly used templates
  • Review important competitive programming concepts
  • Prepare for programming contests
  • Keep useful snippets organized for future reference

Repository Contents

The library may contain reusable implementations for:

Data Structures

  • Arrays
  • Linked Lists
  • Stack
  • Queue
  • Deque
  • Priority Queue
  • Set
  • Multiset
  • Map
  • Unordered Map
  • Heap
  • Trie
  • Segment Tree
  • Fenwick Tree / BIT
  • Disjoint Set Union (DSU)

Algorithms

  • Binary Search
  • Sorting
  • Two Pointers
  • Sliding Window
  • Prefix Sum
  • Difference Array
  • Greedy Algorithms
  • Divide and Conquer
  • Recursion
  • Backtracking
  • Dynamic Programming
  • Bit Manipulation

Graph Algorithms

  • BFS
  • DFS
  • Dijkstra
  • Bellman-Ford
  • Floyd-Warshall
  • Topological Sort
  • Cycle Detection
  • Connected Components
  • DSU
  • Kruskal
  • Prim
  • Minimum Spanning Tree
  • Shortest Path Algorithms

Number Theory

  • GCD / LCM
  • Prime Checking
  • Sieve of Eratosthenes
  • Prime Factorization
  • Modular Arithmetic
  • Modular Exponentiation
  • Combinations
  • Permutations
  • Euler's Totient Function

String Algorithms

  • String Hashing
  • Pattern Matching
  • Prefix Function
  • KMP
  • Trie
  • Frequency Counting
  • String Manipulation

Competitive Programming Templates

  • C++ Boilerplate
  • Fast I/O
  • Debugging Templates
  • Common STL Utilities
  • Custom Comparators
  • Coordinate Compression
  • Binary Search Templates
  • Graph Templates
  • Dynamic Programming Templates
  • Number Theory Templates

Example Structure

Competitive-Programming-Code-Library/
│
├── Template/
│   ├── C++_Template.cpp
│   └── Fast_IO.cpp
│
├── Data-Structures/
│   ├── DSU.cpp
│   ├── Segment_Tree.cpp
│   ├── Fenwick_Tree.cpp
│   └── Trie.cpp
│
├── Graph/
│   ├── BFS.cpp
│   ├── DFS.cpp
│   ├── Dijkstra.cpp
│   ├── DSU.cpp
│   ├── Kruskal.cpp
│   └── Topological_Sort.cpp
│
├── Dynamic-Programming/
│   ├── Knapsack.cpp
│   └── LIS.cpp
│
├── Number-Theory/
│   ├── GCD.cpp
│   ├── Sieve.cpp
│   └── Modular_Exponentiation.cpp
│
├── Searching/
│   ├── Binary_Search.cpp
│   └── Two_Pointers.cpp
│
├── Strings/
│   ├── KMP.cpp
│   ├── Hashing.cpp
│   └── Trie.cpp
│
└── README.md

About

A personal competitive programming code library containing reusable templates, algorithms, data structures, utility functions, and commonly used code snippets for contests and problem solving.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages