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


Please Help Members By Posting Answers For Below Questions

Which sorting is best and why?

499


What is a spanning tree?does the minimum spanning tree of a graph give the shortest distance between any 2 specified nodes?

506


What is data algorithm?

500


What sort of serious problems have you experienced, and how have you handled them?

602


Is an arraylist an object?

482






How would you swap the Kth node from beginning with Kth node from end in a Linked List.

564


Does arraylist maintain insertion order?

469


What is the time complexity of arrays sort?

469


What is dangling pointer and how to avoid it?

551


What is the difference between arraylist and hashmap?

430


What are the advantages of linked list over an array?

551


What is Jagged Arrays?

551


How do you get placements?

472


What is data structure explain in detail?

513


When would you use a hashmap?

457