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 / binita
binary search is faster
as the root has the value greater then left subtree & less
then right subtree so sorting is easier
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How do you define a set?
What data type is array?
Describe stack operation.
List out the basic operations that can be performed on a stack?
Differentiate between list and map.
Can we insert null in hashset?
Do you know what is linear search?
Which collection is used for sort?
What is the best sorting technique?
What are different sorting algorithms?
What is the difference between 1d and 2d array?
Why use a tuple instead of a list?
what is the difference between dynamic as well as non - dynamic data structures.
What is time complexity of binary search?
What is time complexity of bubble sort?