Skip to content

Standard Template and algorithms library of C++ for Python with C-Python API

License

Notifications You must be signed in to change notification settings

sanoguzhan/STAlib

Repository files navigation

STALib

build Downloads experimental unstable

Standard Template and algorithms library of C++ for Python with C-Python API

Stalib Library includes complementary algotrithms and templates to Python's built-in. The algorithms implemented in C++ and extended to Python and compitable with Python's list objects.

Algorithms:

Name Type Worst-case Performance Module
Buble Sort Sort O(n^2) algorithms
Merge Sort Sort O(nlogn) algorithms
Quick Sort Sort O(n^2) algorithms
Binary Search Search *O(Logn) algorithms

*Sorted Array


Getting started

To get started, install the library with pip

    pip install stalib

Example

Import the algorithms or templates:

    >>> from stalib.algorithms import merge_sort
    >>> iterable = [1,9,2,4]
    >>> list(merge_sort(iterable))
    [1, 2, 4, 9]

For the full listing of functions, see stalib

About

Standard Template and algorithms library of C++ for Python with C-Python API

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published