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 / naresh
binary search..if the elements are not in a sorted order
then sequential search or linear search would be better.
| Is This Answer Correct ? | 7 Yes | 0 No |
Post New Answer View All Answers
What is the need for path compression?
Tell us the difference between merge and quick sort. Which one would you prefer and why?
How to increase stack limit in w3wp.exe?
Given M x N matrix with sorted elements row wise and column wise, find elements?
Why do we Use a Multidimensional Array?
Is list same as array?
How treemap orders the elements if the key is a string?
Define graph traversals?
What are arrays give example?
What do you mean by linear probing?
Define 2-3-4 tree?
What are different types of algorithms?
Is unordered_map a hash table?
What happens if we put a key object in a hashmap which exists?
What thread means?