please tell me the programe for using binary search
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
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
Unless of course, said inquirer has enough wherewithal to read the FAQ.
Mainframe assembler programmer by trade. C coder when I can.
Read the what?
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
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.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).What do you mean by binary search anyway?
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
If you want to do it yourself: http://cprogramming.com/discussionar...searching.html
dwk
Seek and ye shall find. quaere et invenies.
"Simplicity does not precede complexity, but follows it." -- Alan Perlis
"Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
"The only real mistake is the one from which we learn nothing." -- John Powell
Other boards: DaniWeb, TPS
Unofficial Wiki FAQ: cpwiki.sf.net
My website: http://dwks.theprogrammingsite.com/
Projects: codeform, xuni, atlantis, nort, etc.