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 / p.divya poojitha
binary search is faster than sequential searching.in
sequential searching the desired record is 4000 if u search
that record can be done with 1....4000 so it takes large
time for searching compare complexities of both searching
meathods are
binary search O(logn)
sequential search O(n)
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What are the two traversal strategies used in traversing a graph?
What is a string or array type?
For addition and deletion. Which one is most preferred: array list or linked list?
Does hashset allow duplicates?
What is the best complexity of bubble sort?
What is the difference between hashset and treeset?
What is array and its types in data structure?
What is bubble sort and quick sort?
What are the operations that can be performed on a stack?
Who created quicksort?
How is a hashset implemented?
What is data structure and why we need it?
What does args stand for?
What member function places a new node at the end of the linked list?
What are the difference between a stack and a queue?