simple question about the Binary search
simple question about the Binary search method
Mar 6, 2013 at 11:30pm UTC
in a binary search method
if my search key is not in the array will the program search the whole entire array until it realizes it does not exist?
Mar 6, 2013 at 11:36pm UTC
Binary search requires the data to be sorted, so no it won't.
Mar 7, 2013 at 12:53am UTC
Topic archived. No new replies allowed.
General C++ Programming
© cplusplus.com, 2000-2016 - All rights reserved -
Spotted an error? contact us