rolling-scopes-school/guessing-game

Name: guessing-game

Owner: Rolling Scopes School

Description: Guessing game tests

Created: 2017-01-27 13:43:50.0

Updated: 2017-09-25 20:18:46.0

Pushed: 2017-12-30 22:41:42.0

Homepage: null

Size: 4

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Guessing game

?? DO NOT SUBMIT PRS WITH SOLUTIONS TO THIS REPO ??

Description

Your task is to implement GuessingGame class

Methods: setRange(min, max)

this method accepts min and max value of range of number to guess

guess()

this method returns solution candidate (you make an assumption based on range and previous assumptions)

lower()

this method is called if prev call of guess() returned number which is greater than answer

greater()

this method is called if prev call of guess() returned number which is lower than answer

Your implementation should use binary search algorithm under the hood to pass all tests

Prerequisites
Run tests
test
Run in browser
start

open http://localhost:8080


© R1ZZU


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.