Coder Social home page Coder Social logo

binary_search's Introduction

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.

binary_search's People

Contributors

mikeizbicki avatar abizermamnoon avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.