Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mikeizbicki/binary_search
https://github.com/mikeizbicki/binary_search
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/mikeizbicki/binary_search
- Owner: mikeizbicki
- Created: 2020-02-25T08:05:18.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-03-03T04:24:21.000Z (almost 2 years ago)
- Last Synced: 2024-11-08T22:37:12.670Z (2 months ago)
- Language: Python
- Size: 10.7 KB
- Stars: 0
- Watchers: 3
- Forks: 122
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Binary Search
[![](https://github.com/mikeizbicki/binary_search/workflows/tests/badge.svg)](https://github.com/mikeizbicki/binary_search/actions?query=workflow%3Atests)
[![](https://github.com/mikeizbicki/binary_search/workflows/extra_credit/badge.svg)](https://github.com/mikeizbicki/binary_search/actions?query=workflow%3Atests)You will implement several variations of the binary search algorithm.
**Learning Objectives:**
1. understand the binary search algorithm
1. practice recursion## Tasks
Complete the following tasks:
1. Fork the [binary\_search repo](https://github.com/mikeizbicki/binary_search) and enable github actions
1. Update the `README.md` file so that the test case badges point to your forked repo
1. Implement the `find_smallest_positive`, `count_repeats`, and `argmin` functions so that all test cases in `tests/test_main.py` pass.
You must implement each function recursively,
and you must ensure that they have logarithmic runtime.
(The test cases will not all pass if they do not have logarithmic runtimes.)Optional:
1. You can get 2 points of extra credit if you also implement the `find_boundaries` function so that all test cases in the `tests/test_ec.py` file pass.
Pseudocode for the function is provided in the `binary_search.py` file.## Submission
Submit the link to your forked repository on sakai.