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 / nishant singh

Binary search is faster because we traverse the elements by
using the policy of Divide and Conquer.
we compare the key element with the approximately center
element, if it is smaller than it search is applied in the
smaller elements only otherwise the search is applied in the
larger set of elements.
its complexity is as we all know is log n as compared to the
sequential one whose complexity is n.

Is This Answer Correct ?    30 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Define graph?

1106


Why is tuple immutable?

821


What are the different binary tree traversal techniques?

1026


in tree construction which is the suitable efficient data structure? (Array, linked list, stack, queue)

1252


Define threaded binary tree. Explain its common uses

877


Explain binary searching and Fibinocci search?

957


Why would you use a linked list?

928


Can an arraylist be null?

916


What is sequential search?

942


Why do we need arrays if all the operations that are performed on arrays can be performed on arraylist?

861


What is a stable sort?

861


Can we insert null in list?

890


What is an acyclic graph?

1030


Define the tree data structure.

884


What are the different types of sorting? Explain the difference between them.

1034