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
In what scenario, binary search can be used?
What is difference between hashset and linkedhashset?
If you are given a choice to use either arraylist and linkedlist, which one would you use and why?
Mention the advantages of representing stacks using linked lists than arrays?
What is stable sort example?
How many types of searching are there in data structure?
What is list and types of list?
Does hashmap allow duplicate keys?
What are common data structures?
Why is hashing used?
What is the use of sorting?
Is char array null terminated?
What are the advantages of bubble sort?
What is max heapify?
What is linked list with example?