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
State the difference between persistent and ephemeral data structure?
What is the difference between hashset and linkedhashset?
What is an externalizable interface?
Which is better stack or queue?
What is difference between list set and map?
Is array immutable?
What do you mean by breadth first search (bfs)?
How do you find a string is anagram or not?
State the merit of linked representation of binary trees?
What is binary tree give example?
Is bucket sort a comparison sort?
What are the advantages of data structure?
Can we store primitives in collections?
What is the best sorting technique?
What is time and space complexity of bubble sort?