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 sort does arrays sort use?
Can hashset contain null?
Why hashmap is faster than hashset?
We know that Arrays are objects so why cannot we write strArray.length()?
What does it mean to sort an array?
How do you do a selection sort?
Why is map not a collection?
What is stack push?
Define linked list data structure.
How can you insert a node at the end of linked list?
What is the default size of an arraylist?
Are sets sorted?
How do you sort a collection in descending order?
Which sorting algorithm is used in arrays sort?
Does set allow null values?