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 is difference between map and hashmap?
What is stable sorting method?
Describe avl tree or height balanced binary search tree.
What do you mean by data types?
What are the applications of priority queues?
Why is treeset sorted?
Define an algorithm. What are the properties of an algorithm? What are the types of algorithms?
List out the basic operations that can be performed on a stack?
What is a class user?
Are collections thread safe?
What is data structure in programming language?
Define open addressing?
Is it possible to make an array volatile in java?
why boundary tag representation is used?
Explain the Linked List