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
Explain what are the major data structures used in the hierarchical data model?
Treemap orders the elements on which field?
Define a tree?
What are the advantages of stack?
What is modcount in hashmap?
which notations are used in evaluation of arithmetic expressions using prefix and postfix forms?
What do you know about the big-o notation and can you give some examples with respect to different data structures?
Explain what is B-tree?
Define threaded binary tree. Explain its common uses
Explain the term base case?
How do you find the space complexity of a bubble sort?
Is array part of collection framework?
Explain set interface?
Define dynamic data structures?
What is space complexity of a program?