Computer Applications
Which of the following statements is true?
- Binary search is less efficient than linear search.
- Binary search is more efficient than linear search.
- Binary search is as efficient as linear search.
- None of the above
Java Arrays
7 Likes
Answer
Binary search is more efficient than the linear search.
Reason — Binary search is more efficient than linear search as it requires lesser number of comparisons to find an element in an array compared to linear search.
Answered By
6 Likes
Related Questions
By default, floating literal is
- double
- float
- int
- long
JVM converts bytecode directly into
- machine code
- another byte code
- high level code
- None of these
Which element is num[9] of array num?
- 8th
- 9th
- 10th
- 11th
What is the value returned by function compareTo( ), if the invoking string is less than the string compared?
- zero
- value less than zero
- value greater than zero
- None of the above