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
How can we remove loops in a linked list? What are the functions of fast and slow pointers?
Where will be the free node available while inserting a new node in a linked list?
What is the difference between hashset and treeset?
What are linked lists good for?
What is meant by a dynamic array?
Is array a collection?
Is array part of collection framework?
What is circular queue example?
What's difference between stack and queue?
What is meant by balanced binary tree?
Why you need a data structure?
Tell me the difference between the character array and a string.
Why hashtable is faster than arraylist?
How can you represent a linked list node?
Can hashset contain null?