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 / srikanth
binary search if of order log n where as sequential search
is of order n
binary search is faster..
Is This Answer Correct ? | 36 Yes | 2 No |
Post New Answer View All Answers
Which sorting is best and why?
What is a spanning tree?does the minimum spanning tree of a graph give the shortest distance between any 2 specified nodes?
What is data algorithm?
What sort of serious problems have you experienced, and how have you handled them?
Is an arraylist an object?
How would you swap the Kth node from beginning with Kth node from end in a Linked List.
Does arraylist maintain insertion order?
What is the time complexity of arrays sort?
What is dangling pointer and how to avoid it?
What is the difference between arraylist and hashmap?
What are the advantages of linked list over an array?
What is Jagged Arrays?
How do you get placements?
What is data structure explain in detail?
When would you use a hashmap?