sanoguzhan / STAlib

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

License:MIT License


Languages

Language:Python 73.8%Language:C++ 23.2%Language:Makefile 3.0%