Problem 56040. A Binary Search
Solution Stats
Problem Comments
-
3 Comments
This is a good exercise, but you can't enforce people to do a binary search in a programming competition unless you can find a way to identify a search done with a binary search uniquely.
Maybe requiring that the sequence of midpoints until a key is retrieved is returned as part of the solution. It would make it harder to "cheat".
You can add the incrementation of the number of iterations in your algorithm's description and test its exact value in the test suite.
Solution Comments
-
1 Comment
uh.. oh well
Problem Recent Solvers37
Suggested Problems
-
Return the largest number that is adjacent to a zero
4665 Solvers
-
5154 Solvers
-
Find the alphabetic word product
2874 Solvers
-
ベクトル [1 2 3 4 5 6 7 8 9 10] の作成
434 Solvers
-
Molar Air Density from Temperature and Pressure
63 Solvers
More from this Author10
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!