Skip to main content

A library of algorithms and data structures for competitive programming

Project description

Competitive Programming Library

A comprehensive library of algorithms and data structures commonly used in competitive programming.

Installation

You can install the package using pip:

pip install competitive-programming-lib

Usage

Here's a quick example of how to use some of the algorithms:

from competitive_programming_lib import CompetitiveProgrammingLib as cpl

# Dijkstra's Algorithm
graph = {
    0: {1: 4, 2: 1},
    1: {3: 1},
    2: {1: 2, 3: 5},
    3: {}
}
distances, predecessors = cpl.dijkstra(graph, 0)
print("Shortest distances from node 0:", distances)

# More examples...

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

competitive-programming-lib-0.1.0.tar.gz (5.8 kB view hashes)

Uploaded Source

Built Distribution

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page