{{ message }}
/ CPLibrary Public

Competitive Programming Library

# ramizouari/CPLibrary

Switch branches/tags
Could not load branches
Nothing to show

## Files

Failed to load latest commit information.
Type
Name
Commit time

# Competitive Programming Library

## 1. Rationale

During my Competitive Programming's journey, I spent a good time exploring novel approaches on many interesting problems. This lead me to learn many new algorithms and data structures, and even incorporate my knowledge from different fields (Linear Algebra, Abstract Algebra...) to solve many hard problems. So I decided to write them in this repository.

I chose to write that acquired knowledge on this repository so that I can share my wonderful journey with any interested person.

## 2. Content

This repository contains a list of non-trivial algorithms & data structures that I have used at least once in competitive programming settings. It is written with emphasis on readability, zero-overhead, and also correctness and mathematical rigour.

The following list of topics are present on this library:

1. Data Structures:
• Segment Tree over an associative binary operation
• Fenwick Tree over a group
• Sparse Table over an assoviative idempotent binary operation
• Order Statistic Tree
• Statistic Trees with Statistic acting on keys and/or values (over an associative binary operation)
2. String (To Be Completed):
• Rabin-Karp probabilistic string matching algorithm.
• ...
3. Graph (To Be Done)
4. Abstract Algebra:
5. Modular Arithmetic
6. Linear Algebra:
• dynamic and static vectors over commutative rings
• dynamic and static matrices over commutative rings
• Matrix arithmetic
• Solving of a linear system over a field
• Calculating matrix determinant
• Calculating the characteristic polynomial of a matrix over a field or an integral domain.
7. Polynomials(To Be Complete):
• Polynomials and sparse polynomials over a commutative ring
• Polynomials arithmetic
• subquadratic polynomial multiplication for commutative rings
• Newton Interpolation
8. FFT(To Be Complete):
9. Fast Polynomials(To Be Done)
10. Number Theory:
11. Optimization:
• Simplex Method

## 3. Additional Content

The following list of topics was not intended for CP, but I chose to include it as a demonstration to the power of this library:

1. Analysis:
2. Topology:
3. Functional:
• pointwise unary operators: calculate a scalar function pointwise on all elements of a matrix, vector or even an iterable
• pointwise binary operators
• foreach over iterables
• pointwise reduce: reduce all elements under an associative binary operator
• pointwise aggregate: transform each element of a matrix/vector to a given element, and reduce the resulting matrix/vector under an associative operator
4. Generic:
• zip function: iterate simultaneously over iterables having the same size.
5. Basic Machine Learning Support:
• Linear Regression
• Logistic Regression
• Multinomial Logistic Regression
• K-Neighbours Regression
• K-Neighbours Classification
6. Order:
7. B-Tree:

## 4. Remarks

This is only a tiny subset of the computer science & mathematical litterature, so I recommend you to frequently read and discover new topics.

Competitive Programming Library

## Releases

No releases published

## Packages 0

No packages published