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

Explain binary searching and Fibinocci search?

947


Will arraylist maintain insertion order?

912


What are linked lists used for?

956


Is a hashset ordered?

982


Differentiate between hashmap and hashtable.

1105


What is 1d array?

952


What is difference between list and linked list?

940


What is data type and its types?

931


What is the method to find the complexity of an algorithm?

1094


What is inplace sorting?

1062


Why quicksort is faster than merge sort?

893


Differentiate between push and pop?

1250


What is the difference between Array and Arraylist?

1073


What is the logic to reverse the array?

892


What is the minimum number of queues that can be used to implement a priority queue?

942