Thread: linear and binary search!!

  1. #1
    Registered User
    Join Date
    Feb 2014
    Posts
    3

    linear and binary search!!

    please explain these questions

    In the worst case, how many elements must be compared to search a list of 20,000 elements using the linear search algorithm?


    In the worst case, how many elements must be compared to search a list of 20,000 elements using the binary search algorithm?

  2. #2
    Registered User
    Join Date
    Jan 2009
    Location
    Australia
    Posts
    375
    OP cross posted and question was answered here Help with s binary search and linear search in C++? - Yahoo Answers

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Linear Search
    By tsmith94 in forum C Programming
    Replies: 5
    Last Post: 10-16-2011, 09:33 PM
  2. Difference Between A Linear Search And Binary Search
    By ImBack92 in forum C Programming
    Replies: 4
    Last Post: 05-12-2011, 08:47 AM
  3. no. of comparisons in linear/binary search
    By alice in forum A Brief History of Cprogramming.com
    Replies: 7
    Last Post: 06-05-2004, 10:55 PM
  4. binary search or linear search
    By vajira in forum C Programming
    Replies: 0
    Last Post: 06-05-2003, 12:42 PM