Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Which one is faster?
A binary search of an orderd set of elements in an array
or
a sequential search of the elements.

Answer Posted / p.divya poojitha

binary search is faster than sequential searching.in
sequential searching the desired record is 4000 if u search
that record can be done with 1....4000 so it takes large
time for searching compare complexities of both searching
meathods are
binary search O(logn)
sequential search O(n)

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can arraylist shrink?

951


What is array traversing?

933


What is the difference between binary tree and binary search tree?

930


What is the difference between hashset and linkedhashset?

1060


How does a treemap work?

1039


What are the best data structure courses for gate preparation?

961


Can we use any class as map key?

922


Give one example of right rotation.

983


Which language is best for data structures?

1000


How would you use qsort() function to sort the name stored in an array of pointers to string?

993


How do you sort an arraylist in descending order?

835


Write code for reversing a linked list.

1004


Which is better hashmap or hashtable?

969


What do you mean by priority queue?

983


If you are using c language to implement the heterogeneous linked list, explain what pointer type will you use?

1034