Giter Site home page Giter Site logo

elusiverabbit's Introduction

ElusiveRabbit

A simulation and algorithm application to find an elusive rabbit that hops from hole to hole Inspired by the Ben Awad Mock Coding Interview with Redux Co-Creator Dan Abramov

Here are the rules of the simulation:

  • The rabbit is randomly placed in a collection of holes, whose collection size is determined by the NUM_HOLES variable.
  • You may only search one hole at a time.
  • When a hole is searched, the rabbit leaves it's current hole and hops to a hole adjacent to it's previous hole. That is left or right of whatever hole it was currently at

Solution

What is the best method to deterministically find this pesky, small mammal?

  • Well, as is demonstrated in the mock interview, the best method is to make several passes through the collection of holes and on each pass either search only odd or even holes.
  • This simple python script showcases this idea!

Contribution

Feel free to contribute, reuse, and distribute any of the code in this repository, free of charge!

elusiverabbit's People

Contributors

dillonrmd avatar

Stargazers

 avatar Ayren King avatar

Watchers

 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.