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

Define linked list data structure.

586


Why you need a data structure?

619


Define graph?

733


What is the use of sorting the data?

557


What does arrays tostring do?

480






What is the difference between linked list and array?

502


How efficient is bubble sort?

510


What is default size of hashmap?

492


what is traversal in linked lists?

577


How is a queue works?

545


Why is map not a collection?

460


What is the difference between array sort () and array sort t >()?

462


State the rules to be followed during infix to postfix conversions?

701


What are basic algorithms?

459


A lot of data structures related programs related to only trees and graphs, like the diameter of a tree, removing the loops in a graph etc.

529