Michaelhess17 / binary_search

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Binary Search

You will implement several variations of the binary search algorithm.

Learning Objectives:

  1. understand the binary search algorithm
  2. practice recursion

Tasks

Complete the following tasks:

  1. Fork the binary_search repo and enable github actions
  2. Update the README.md file so that the test case badges point to your forked repo
  3. 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.

About


Languages

Language:Python 100.0%