Skip to main content

A Python Package for Competitive Programming

Project description

Fast Cp

A Python Library that contains various functions to make Competitive Programming easy. This Package includes pre-defined functions that are quite useful in Competitive Programming.

Purpose of Package

  • The main purpose of this package is to provide various functions that are helpful for Competitive Programming.

Features

  • Collections of fastcp
    • Collections of arrays
      • Unique
      • Subarr
      • Subseq
      • Freq
      • Length
    • Collections of strings
      • VowelCount
      • Freq
      • Substr
      • Subseq
    • Collections of bitMan
      • Binary
      • Hexa
      • Octal
      • Toggle
      • CountSetBits
      • BinToDecimal
      • OctToDecimal
      • HexToDecimal
    • Collections of math
      • Cbrt
      • Product
      • Sieve
      • IsPrime
    • Collections of search
      • Find
      • LowerBound
      • UpperBound
    • Collections of trees
      • Create
      • Inorder
      • Preorder
      • Postorder
      • Levelorder

Getting Started

This package can be found on PyPi. Hence you can install it using pip

Installation

pip install fastcp

Usage

importing all sub-packages from fastcp

>>> from fastcp import *
>>> subsequences = arrays.Subseq([1,2,3,4,5])

importing a single sub-package from fastcp

>>> from fastcp import bitMan
>>> toggled_number = bitMan.Toggle(123)

Examples

>>> from fastcp import arrays

>>> arrays.Freq([1,1,2,2,2,3])
{1:2, 2:3, 3:1}

>>> from fastcp import strings

>>> strings.Substr("python")
['python', 'ython', 'thon', 'hon', 'on', 'n']

>>> strings.Subseq("Pypi")
['Pypi', 'Pyp', 'Pyi', 'Py', 'Ppi', 'Pp', 'Pi', 'P', 'ypi', 'yp', 'yi', 'y', 'pi', 'p', 'i', '']

>>> from fastcp import trees
>>> root = trees.Create(10)
>>> root.left = Create(5)
>>> root.right = Create(20)
>>> trees.Inorder(root)
[5, 10, 20]
>>> trees.Preorder(root)
[10, 5, 20]
>>> trees.Postorder(root)
[5, 20, 10]
>>> trees.Levelorder(root)
[[10], [5, 20]]

Author

Avinash Doddi [https://github.com/avinash-doddi]

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

fastcp-1.0.1.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

fastcp-1.0.1-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file fastcp-1.0.1.tar.gz.

File metadata

  • Download URL: fastcp-1.0.1.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.0

File hashes

Hashes for fastcp-1.0.1.tar.gz
Algorithm Hash digest
SHA256 562d943cd40dc1350598b9f30d278e32b5d46ba8272e67b343cf99eea3716847
MD5 b6352f7d9cb47ea23f5da6c50f47ea2f
BLAKE2b-256 3e72a07b8de7cae12eeee073929bebd1f95d4b7d43613c9eab2267a9231c77f6

See more details on using hashes here.

File details

Details for the file fastcp-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: fastcp-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.0

File hashes

Hashes for fastcp-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5c81749a5f28b58f47b540b4e9accc5f2240410a3c4a5553f2ceaf2119fd7a40
MD5 215df076a415023be232565d520f308f
BLAKE2b-256 c254e282745840cf8a75d518e84220494311290fc27decf9ba40f0081973df55

See more details on using hashes here.

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