pysearchalgo
Search & sort algorithms
Installation
pip install pysearchalgo
💡 Usage Examples
Basic Operations
from pylib_searchalgo import binary_search, linear_search, quick_sort, merge_sort
# Binary search in sorted array
arr = [1, 3, 5, 7, 9]
index = binary_search(arr, 5)
# 2
# Linear search
index = linear_search([1, 2, 3, 4, 5], 3)
# 2
# Quick sort
sorted_arr = quick_sort([3, 1, 4, 1, 5])
# [1, 1, 3, 4, 5]
# Merge sort
sorted_arr = merge_sort([3, 1, 4, 1, 5])
# [1, 1, 3, 4, 5]
AI/ML Use Cases
from pylib_searchalgo import binary_search, linear_search, quick_sort, merge_sort
# Search sorted feature vectors
features = sorted([0.1, 0.5, 0.9, 0.3])
target_index = binary_search(features, 0.5)
# Sort training data
sorted_data = quick_sort(training_data, key=lambda x: x['score'])
📚 API Reference
See package documentation for complete API reference.
🤖 AI Agent Friendly
This package is optimized for AI agents and code generation tools:
- Clear function names and signatures
- Comprehensive docstrings with examples
- Type hints for better IDE support
- Common use cases documented
- Zero dependencies for reliability
License
MIT
Release files for pylib-searchalgo 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pylib_searchalgo-0.1.0.tar.gz | 2.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pylib_searchalgo-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 4.4 kB
Release files / pylib_searchalgo-0.1.0.tar.gz
| Download URL | pylib_searchalgo-0.1.0.tar.gz |
|---|---|
| Size | 2.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
167fd8765ede8829a2d472bf5ee1b452fd02a6cb9b5a398fc1ae899a8d0691e5
|
|
BLAKE2b-256 checksum How to use checksums |
d85b8ced29b97d7b4bb9f6fbbef15c44c0c4471eaebf4ba386f4146419605c9a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Release files / pylib_searchalgo-0.1.0-py3-none-any.whl
| Download URL | pylib_searchalgo-0.1.0-py3-none-any.whl |
|---|---|
| Size | 2.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c1383558c8884d61a6e8573e11847c8a936c8e873bdf06bebda0db96bc96d024
|
|
BLAKE2b-256 checksum How to use checksums |
f1b9ab3586abbba044d22c05a105f7baca23e40bb9dd061a2dcab8d94229aff8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|