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
To get started, install the library with pip
pip install stalib
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