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

binary search is faster
as the root has the value greater then left subtree & less
then right subtree so sorting is easier

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How would you sort words in a large file?

746


How to reference all the elements in a one-dimension array?

1080


What is data type with example?

699


What are threaded binary trees?

745


Where will be the free node available while inserting a new node in a linked list?

772


Differentiate between set and map.

802


What is best time complexity?

640


What is difference between list and array list?

664


What do you mean by level of the tree?

787


What is hashing with example?

701


Advanced problems related to Data Structures were asked

743


Is quicksort faster than merge sort?

708


What is the use of sorting?

753


What is data structure and data type?

762


What are the advantages of binary search over linear search?

859