Skip to content

About

C++ algorithm templates for competitive programming

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

Algorithm Templates

C++ templates for competitive programming, algorithm practice, and reusable problem-solving patterns.

This repository is organized by topic. Each template aims to be:

  • Easy to copy into contests
  • Object-oriented where it improves readability
  • Small enough to review quickly
  • Documented with use cases and complexity

Structure

algorithm-templates/
  data-structures/
    segment-tree/
      segment-tree-oop.cpp
      README.md

Available Templates

Topic Template Description
Data Structures Segment Tree Object-oriented segment tree supporting range query and point update.

Planned Topics

  • Fenwick tree
  • Disjoint set union
  • Sparse table
  • Dijkstra
  • Kruskal
  • Tarjan
  • KMP
  • Trie
  • Knapsack DP

Usage

Most templates are standalone C++ files. You can copy the file into an online judge solution or compile it locally:

g++ -std=c++17 data-structures/segment-tree/segment-tree-oop.cpp -o segment-tree
./segment-tree

About

C++ algorithm templates for competitive programming

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages