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 / naresh

binary search..if the elements are not in a sorted order
then sequential search or linear search would be better.

Is This Answer Correct ?    7 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we search the data in a linked list?

503


Is a hashmap a dictionary?

467


Can hashset contain null?

478


What is the difference between 1d and 2d array?

489


What is top in stack?

449






Can tuple be sorted?

503


Write the importance of hashing?

605


What are the types of collision resolution strategies in open addressing?

582


What do you mean by Syntax Error

560


Define the tree data structure.

513


Can treemap have null values?

489


What is stable sort example?

506


What is tree and its properties?

511


List out the applications of a linked list?

500


Is binary tree a binary search tree?

484