binarysearch_build
A simple implementation of binary search in Python.
Binary Search
Binary Search is a searching algorithm used in a sorted array by repeatedly dividing the search interval in half.
Installation
- Make sure you have Python installed in your system.
- Run Following command in the CMD.
pip install search_binary
Usage
Here's an example of how to use the binary_search function:
from search_binary import binary_search
arr = [1, 2, 3, 4, 5, 6, 7, 8, 9]
target = 5
result = binary_search(arr, target)
print(result) # Output: 4
The binary_search function takes in two arguments: arr and target. The arr argument is a list of sorted values, and the target argument is the value you're searching for in the list. The function returns the index of the target value in the list, or -1 if the target value is not found.
Contributing
Contributions are welcome! If you'd like to contribute, simply fork the repository, make your changes, and submit a pull request.
License
This package is licensed under the MIT License. See the LICENSE file for details.
Metadata
Release files for search-binary 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| search_binary-0.0.1.tar.gz | 2.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| search_binary-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.2 kB
Release files / search_binary-0.0.1.tar.gz
| Download URL | search_binary-0.0.1.tar.gz |
|---|---|
| Size | 2.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b012c37e6b4e62cdac6633d3cccf2c3657dcc72426883f8970345be76cbe7125
|
|
BLAKE2b-256 checksum How to use checksums |
a00ff5677ce68c28f8a4f44f9b7d05ce21a036aa1951516fce8b0a3a93a3c23f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.7
|
Release files / search_binary-0.0.1-py3-none-any.whl
| Download URL | search_binary-0.0.1-py3-none-any.whl |
|---|---|
| Size | 3.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1009f160bd23e2e9a8292fb324838eca673466eb326e126a2b75d3ec599b4f7e
|
|
BLAKE2b-256 checksum How to use checksums |
83df8e76b5ce9f0a13a684956f10c91e41e4748986f688383c458f1b449218dd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.7
|
Security for search-binary 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.