You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
setRange(min, max)
this method accepts min and max value of range of number to guess
To this:
setRange(min, max)
this method accepts min (not included) and max (included) value of range of number to guess,
in mathematics that would be (min, max]
Why do so
The proposed changes leave less room for ambiguity.
The solution that passes all tests does not find the min value of method setRange,
no matter how many times method lower is called.
It implies that min is not included in the searching range.
Possibly because of that a common binary search algorithm that can actually find min won't pass most of the tests.
The solution that passed 100% of the tests won't find the min value 0 of setRange(0, 4)
As already mentioned above solution that passes all tests won't work if we will choose 0 as our number to guess. Also solution that works for all tests is not described among procedures in Wikipedia and visa versa: procedures that described in Wikipedia won't pass any of tests
Add changes to README.md
Change this:
setRange(min, max)
this method accepts min and max value of range of number to guess
To this:
setRange(min, max)
this method accepts min (not included) and max (included) value of range of number to guess,
in mathematics that would be (min, max]
Why do so
The proposed changes leave less room for ambiguity.
The solution that passes all tests does not find the min value of method
setRange
,no matter how many times method
lower
is called.It implies that min is not included in the searching range.
Possibly because of that a common binary search algorithm that can actually find min won't pass most of the tests.
The solution that passed 100% of the tests won't find the min value 0 of setRange(0, 4)
The text was updated successfully, but these errors were encountered: