please tell my anyone which one the best method use for searching. linear, binary etc.
thnxx
Printable View
please tell my anyone which one the best method use for searching. linear, binary etc.
thnxx
It depends. What are you searching? How much data is there to search through?
Re: Which one the best method use for Search..?
Searching is an important function in computer science. As the data sets become larger and larger, good search algorithms will become more important. At one point in the history of computing, sequential search was sufficient. But that quickly changed as the value of computers became apparent.
Linear search has many interesting properties in its own right, but is also a basis for all other search algorithms. Learning its working is critical.
Binary search is the next logical step in searching. Performance can be improved significantly when the data set is very large by using interpolation search, and improved yet again by using binary search when the data set gets smaller.