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 / naresh

binary search..if the elements are not in a sorted order
then sequential search or linear search would be better.

Is This Answer Correct ?    7 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

In what scenario, binary search can be used?

721


What is difference between hashset and linkedhashset?

768


If you are given a choice to use either arraylist and linkedlist, which one would you use and why?

732


Mention the advantages of representing stacks using linked lists than arrays?

664


What is stable sort example?

667


How many types of searching are there in data structure?

581


What is list and types of list?

634


Does hashmap allow duplicate keys?

712


What are common data structures?

775


Why is hashing used?

621


What is the use of sorting?

706


Is char array null terminated?

635


What are the advantages of bubble sort?

674


What is max heapify?

647


What is linked list with example?

648