Skip to content

Repository files navigation

CPToolkit

Personal Competitve Programming Toolkit - used for Codeforces and other occasions.

Algorithms

Divide and Conquer

Dynamic Programming

  • max_cons_elements.cpp: finds the maximum sum of array elements with at most n consecutive elements.
  • rod_cutting.cpp: finds the maximize sum from cutting a rod into pieces (rod cutting problem).

Bitmask DP

  • count_tilings.cpp: count the number of ways to fill an n * m grid using 1 * 2 and 2 * 1 tiles using bitmask DP.

Graphs

  • bfs.cpp: standard Breadth First Search (BFS) traversal.
  • dfs.cpp: standard Depth First Search (DFS) traversal.
  • topological_sort.cpp: performs Topological Sorting on a DAG.

Minimum Spanning Tree

  • kruskal.cpp: finds Minimum Spanning Tree using Kruskal’s Algorithm.

Range Queries

Shortest Path

Tools

  • binpow.cpp: finds a^n using Binary Exponentiation

About

Personal Competitive Programming Toolkit

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages