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

What is arrays copyof?

672


What are the advantages of linked list over an array?

727


What is pivot in quicksort?

669


Write an algorithm to check if there is a loop in a doubly linked list.

747


Which is the parent class of linkedhashset class?

699


Can a hashmap have duplicate keys?

713


Why entry interface is used in map?

704


What is the use of data structure in real life?

736


Can you please explain the difference between string and an array?

756


What is the advantage of circular linked list?

583


What is difference between hashmap and hashset?

694


Define graph traversals?

710


What is the difference between data type and data structure?

653


Define internal nodes?

711


What is the difference between arraylist and array?

682