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
What is the difference between Array and Array List ? Explain in brief with example.
Differentiate linear from a nonlinear data structure?
Can we search the data in a linked list?
What are the tasks performed during inorder traversal?
What is difference between list set and map?
What are the types of array operations?
What is concept of data structure?
Explain Array
What should I learn first data structures or algorithms?
Why hashmap is faster than hashset?
List out the disadvantages of using a linked list?
Can we use any class as map key?
An array having 100 elements have numbers from 1 to 99 randomly out of which any number is repeated. Find the repeated number in minimum time and space complexity.
What is a bubble sort and how do you perform it?
What is the default capacity of hashmap?