please tell me the programe for using binary search
Printable View
please tell me the programe for using binary search
No, that's not how it works here. You give us what you know, and we will help you get on track. But we don't "give away" the solution, we lead you to it.
--
Mats
Unless of course, said inquirer has enough wherewithal to read the FAQ.
Read the what? ;)
--
Mats
maha, no one is going to just toss you a complete program, even if you pretty pleased it.
A better approach would be:
How do I make a binary search to use in my program?
or somthing like that.
What do you mean by binary search anyway?
The C++ standard library provides the std::binary_search, std::lower_bound and std::upper_bound generic algorithms that perform binary search over a sorted range.Quote:
please tell me the programe for using binary search
I would think that it is the usual divide and conquer algorithm for searching a sorted range (with random access iterators).Quote:
What do you mean by binary search anyway?
If you want to do it yourself: http://cprogramming.com/discussionar...searching.html