Git Product home page Git Product logo

cp-lib's Introduction

Ubiratan Correia Barbosa Neto - Competitive Programming Library

This repository contains algorithms that I learned through my journey on competitive programming:

  • Data Structures

    • Segment Tree
    • Binary Indexed Tree
    • Dynamic/Persistent Segment Tree
    • Trie
    • Lichao Segment Tree (Online Convex Hull Trick)/ Integer and Float Version
    • Offline Convex Hull Trick
    • Ordered Set
    • Implicit Treap
    • Splay Tree
  • Uncategorized

    • Longest Increase Subsequence
    • 2D Longest Increase Subsequence
    • Inversion Count Offline (Merge-Sort)
    • Mos Query Decomposition
    • Find kth permutation
  • Basic 2D Geometry

    • Point/Vector Structure
    • Vector Structure
    • Line/Segment Structure
    • Distance from Point to Line
    • Distance from Point to Segment
    • Distance from Line to Segment
    • Distance from Point to Ray
    • Distance from Segment to Ray
    • Distance from Line to Ray
    • Distance between Segments
    • Distance between Rays
    • Distance between Lines
    • Line-Line Intersection
    • Segment-Segment Intersection
    • Line-Segment Intersection
    • Circle-Circle Intersection Area
    • Circle-Circle Intersection Points (NOT TESTED)
    • Tangent Line to a Circle Given a Point
    • Circle of Radius R Passing Through 2 Given Points
    • Barycenter, Circumcenter, Incenter, Excenter, Orthocenter, Centroid...
  • 2D Geometry Algorithms

    • Closest Pair of Points
    • Convex Hull(Monotone Chain) + Perimeter/Area Calculation
    • Smallest Enclosing Circle Randomized Algorithm
    • Check if a Point Lies in Convex Hull
    • Largest quadrilater given a set of distinct points
    • Check if line intersects polygon
    • Maximum dot product queries
  • Math and Number Theory

    • Binomial Coefficient
    • Euler Totient
    • Sieve of Erathostenes
    • Miller Rabin Primality Test
    • Count Primes/Divisors for Large Numbers + Sum Of Divisors of a Number
    • Matrix Exponentiation
    • Fast Fourier Transform (Iterative + Recursive)
    • Chinese Remainder Theorem
    • Diophantine Equations
    • Shank's Baby-Step Giant-Steps
  • Strings

    • Knuth - Morris - Pratt (KMP)
    • Z-Function
    • Rolling Hash
    • Aho-Corasick
    • Suffix Array + Linear Sorting (O(nlogn) S.Array)
  • Graphs

    • LCA
    • Max-Flow (Dinic's Algorithm)
    • Minimum Path Cover in Directed Acyclic Graphs
    • Minimum Edge Cover in Bipartite Graph
    • Minimum Cut in Flow Network
    • Minimum Vertex Cover in Bipartite Graph
    • Bellman Ford Shortest Path Algorithm
      • Dynammic Connectivity for connected(u,v) - query
      • Eulerian Circuit Directed/Undirected Graphs
      • Tarjan Algorithm for Bridges/Articulation Points
      • Heavy-Light Decomposition
      • Centroid Decomposition
      • Kosaraju's Strong Connected Components Algorithm

cp-lib's People

Contributors

bira37 avatar biracubos37 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cp-lib's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.