Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: Which one the best method use for Search..?

  1. #1
    Junior Member
    Join Date
    Oct 2013
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Which one the best method use for Search..?

    please tell my anyone which one the best method use for searching. linear, binary etc.

    thnxx


  2. #2
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    6,287
    My Mood
    Mellow
    Thanks
    252
    Thanked 777 Times in 762 Posts

    Default Re: Which one the best method use for Search..?

    It depends. What are you searching? How much data is there to search through?

  3. #3
    Junior Member
    Join Date
    Oct 2013
    Posts
    11
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default Re: Which one the best method use for Search..?

    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.

Similar Threads

  1. Replies: 1
    Last Post: January 23rd, 2013, 07:29 AM
  2. Binary Search Tree Lookup Method
    By Sbonett in forum What's Wrong With My Code?
    Replies: 1
    Last Post: May 15th, 2012, 08:43 AM
  3. Graph Search Theory with extend of BFS, UFS and A* Search in grid
    By keat84 in forum Java Theory & Questions
    Replies: 1
    Last Post: February 7th, 2012, 09:46 AM
  4. Array Search Method
    By Kyuubi426 in forum What's Wrong With My Code?
    Replies: 3
    Last Post: June 28th, 2011, 09:31 PM
  5. Trouble with Binary Search on Insert Method
    By EricSt in forum Algorithms & Recursion
    Replies: 1
    Last Post: February 17th, 2010, 10:34 PM