Skip to content

fork52/CP-ALGOS-DS

Repository files navigation

CP-ALGOS-DS

A collection of Competitive Coding C++ Snippets created by Dhruvam Kothari and Mrunank Mistry.

The repository is a collection of C++ utility functions and classes which come handy in Competitive Coding.

Currently available snippets:

│   .gitignore
│   CMakeLists.txt
│   LICENSE
│   README.md
│
├───.github
│   └───workflows
│           cmake.yml
│
├───Advanced-Data-Structures
│   ├───2D Prefix sums
│   │       prefix_sum_2d.cpp
│   │
│   ├───Fenwick Trees
│   │       count_inversions.cpp
│   │       fenwick_PQRU.cpp
│   │       fenwick_PURQ.cpp
│   │       fenwick_PURQ_0based.cpp
│   │
│   ├───Segment Trees
│   │       min_segment_tree.cpp
│   │       sum_segment_tree.cpp
│   │
│   └───Sparse Tables
│           sparse_table.cpp
│
├───Graphs
│   ├───Directed
│   │   │   cycle_detect_directed.cpp
│   │   │   Dijkstras.cpp
│   │   │
│   │   ├───Binary-Lifting
│   │   │       kth_ancestor.cpp
│   │   │
│   │   ├───Eulerian Graph
│   │   │       eulerian_directed_map.cpp
│   │   │       eulerian_directed_vectors.cpp
│   │   │
│   │   ├───Kahns Algo
│   │   │       kahns_algo.cpp
│   │   │
│   │   └───Kosaraju SCC
│   │           kosaraju_scc.cpp
│   │           kosaraju_scc_example_in_code.jpeg
│   │
│   └───Undirected
│       ├───DSU
│       │       dsu.cpp
│       │
│       └───Eulerian graph
│               eulerian_undirected.cpp
│
├───Number-Theory
│       binary_exp.cpp
│       factorization.cpp
│       modular_inverse.cpp
│       prime_sieve.cpp
│       sieve_factorization.cpp
│
├───Sliding-Window
│       sliding_window_max.cpp
│       sliding_window_min.cpp
│
├───Strings
│   ├───KMP
│   │       CP_ALGOS_EXPLANATION.md
│   │       CP_ALGOS_EXPLANATION.pdf
│   │       KMP.cpp
│   │
│   └───z-function
│           zfunc.cpp
│
└───Trees
    ├───Rooting A Tree
    │       rooting_tree.cpp
    │
    └───Tries
            Tries.cpp

Local Repo Setup

Documentation

Read the docstrings for each class/function/method. Also checkout the main function for each file which demonstrates the usage.

License

The repository is licensed under Apache License .

Contributing

  1. Fork it (https://github.com/fork52/CP-ALGOS-DS/fork)
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Commit your changes (git commit -am 'Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. Create a new Pull Request

About

Competitive Coding C++ Snippets

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published