You will implement several variations of the binary search algorithm.
Learning Objectives:
- understand the binary search algorithm
- practice recursion
Complete the following tasks:
- Fork the binary_search repo and enable github actions
- Update the
README.mdfile so that the test case badges point to your forked repo - Implement the
find_smallest_positive,count_repeats, andargminfunctions so that all test cases intests/test_main.pypass. 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:
- You can get 2 points of extra credit if you also implement the
find_boundariesfunction so that all test cases in thetests/test_ec.pyfile pass. Pseudocode for the function is provided in thebinary_search.pyfile.
Submit the link to your forked repository on sakai.