search-binary


Namesearch-binary JSON
Version 0.0.1 PyPI version JSON
download
home_pagehttps://github.com/Shikha-code36/binary_search
SummaryA binary search implementation in Python
upload_time2023-02-10 14:39:40
maintainer
docs_urlNone
authorShikha Pandey
requires_python
licenseMIT
keywords binary search algorithm python data-structures algorithms binary-search searching-algorithm
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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.






            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Shikha-code36/binary_search",
    "name": "search-binary",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "binary search algorithm,python,data-structures,algorithms,binary-search,searching-algorithm",
    "author": "Shikha Pandey",
    "author_email": "shikha.py36@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/a0/0f/f5677ce68c28f8a4f44f9b7d05ce21a036aa1951516fce8b0a3a93a3c23f/search_binary-0.0.1.tar.gz",
    "platform": null,
    "description": "# binarysearch_build\n\nA simple implementation of binary search in Python.\n\n# Binary Search\n\nBinary Search is a searching algorithm used in a sorted array by repeatedly dividing the search interval in half.\n\n## Installation\n\n- Make sure you have Python installed in your system.\n- Run Following command in the CMD.\n\n ```\n  pip install search_binary\n  ```\n\n  \n## Usage\n\nHere's an example of how to use the `binary_search` function:\n\n```\nfrom search_binary import binary_search\n\narr = [1, 2, 3, 4, 5, 6, 7, 8, 9]\ntarget = 5\nresult = binary_search(arr, target)\nprint(result) # Output: 4\n```\n\nThe `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.\n\n## Contributing\n\nContributions are welcome! If you'd like to contribute, simply fork the repository, make your changes, and submit a pull request.\n\n## License\n\nThis package is licensed under the MIT License. See the `LICENSE` file for details.\n\n\n\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A binary search implementation in Python",
    "version": "0.0.1",
    "split_keywords": [
        "binary search algorithm",
        "python",
        "data-structures",
        "algorithms",
        "binary-search",
        "searching-algorithm"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "83df8e76b5ce9f0a13a684956f10c91e41e4748986f688383c458f1b449218dd",
                "md5": "b9b300186a339fd820f04883153953b5",
                "sha256": "1009f160bd23e2e9a8292fb324838eca673466eb326e126a2b75d3ec599b4f7e"
            },
            "downloads": -1,
            "filename": "search_binary-0.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b9b300186a339fd820f04883153953b5",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 3288,
            "upload_time": "2023-02-10T14:39:38",
            "upload_time_iso_8601": "2023-02-10T14:39:38.922435Z",
            "url": "https://files.pythonhosted.org/packages/83/df/8e76b5ce9f0a13a684956f10c91e41e4748986f688383c458f1b449218dd/search_binary-0.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a00ff5677ce68c28f8a4f44f9b7d05ce21a036aa1951516fce8b0a3a93a3c23f",
                "md5": "3b0f6b93d85cfe9c3d758381cb55371e",
                "sha256": "b012c37e6b4e62cdac6633d3cccf2c3657dcc72426883f8970345be76cbe7125"
            },
            "downloads": -1,
            "filename": "search_binary-0.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "3b0f6b93d85cfe9c3d758381cb55371e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 2892,
            "upload_time": "2023-02-10T14:39:40",
            "upload_time_iso_8601": "2023-02-10T14:39:40.869977Z",
            "url": "https://files.pythonhosted.org/packages/a0/0f/f5677ce68c28f8a4f44f9b7d05ce21a036aa1951516fce8b0a3a93a3c23f/search_binary-0.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-02-10 14:39:40",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "Shikha-code36",
    "github_project": "binary_search",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "search-binary"
}
        
Elapsed time: 0.04366s