Test suite should have assert(isequal(...)).
It's an interesting problem. Unfortunately without any assert, the test suite does not test anything. So any syntactically correct answer succeeds even if it doesn't solve the problem.
Fixed, and (hopefully) rescored. Thanks for the heads up.
your example ([5 7 8]) is not really following the optimal bisection approach. After you choose 5, the new bounds are not 5 and 10, they are 6 and 10, so your next choice should be 8 ((6+10)/2) instead of 7...
The misplaced comment line in the first test case breaks the test suite (at least for "conventional" solutions).
Emphasized Alfonso Nieto-Castanon Comments "your example ([5 7 8]) is not really following the optimal bisection approach. After you choose 5, the new bounds are not 5 and 10, they are 6 and 10, so your next choice should be 8 ((6+10)/2) instead of 7..."
test suit is broken plz fix since its a budge problem
radius of a spherical planet
Roll the Dice!
Sum all integers from 1 to 2^n
Generate N equally spaced intervals between -L and L
Numbers in extended form
Go to the head of the class!
Hackathon - String version
S-T-R-E-T-C-H I-T O-U-T
That's some divisor you've got there...
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office