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
What is arrays copyof?
What are the advantages of linked list over an array?
What is pivot in quicksort?
Write an algorithm to check if there is a loop in a doubly linked list.
Which is the parent class of linkedhashset class?
Can a hashmap have duplicate keys?
Why entry interface is used in map?
What is the use of data structure in real life?
Can you please explain the difference between string and an array?
What is the advantage of circular linked list?
What is difference between hashmap and hashset?
Define graph traversals?
What is the difference between data type and data structure?
Define internal nodes?
What is the difference between arraylist and array?