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 / ujjwal dave

binary search is faster and more useful in case we need to
perform search a number of times, complexity of sequential
search will be n each time where in binary search will take
more time only at first time when data is not sorted once
the data is sorted......it will take only only log n
attempts to search each element.......so the decision also
depends on frequency of the data beign searched

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is array and its types?

990


what is Singly Linked list?

998


Define avl tree?

1155


How can you add an item to the beginning of the list?

1015


Is bubble sort faster than selection sort?

845


Why would you use a linked list?

931


Will hashmap allow null keys?

918


What is the order of b tree?

935


Which is more efficient merge sort vs quicksort?

852


Why is arraylist used?

961


Parenthesis is never required in postfix or prefix expressions, why?

901


What do you mean by 2-3 tree?

923


What are the applications of graph data structure?

911


Differentiate between hashset and hashmap.

990


What is two-dimensional array?

956