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

What data structure does a binary tree degenerate?

612


Which interfaces are implemented by linkedlist?

679


What is the use of isEmpty() member methods?

710


How do arrays work?

713


What is a vector element?

670


How do you increase the capacity of an arraylist?

680


How do you initialize an arraylist?

675


Why do we study data structures?

689


What is default array size?

742


Define balance factor of a node in avl tree?

788


Which sorting algorithm is the slowest?

627


What is meant by a dynamic array?

682


How to use appendNode() in linkedlist()?

846


Is arraylist synchronized?

692


Design a datastructure to represent the movement of a knight on a chess board

719