Computer Science, asked by ullahrizwan085, 24 days ago

Compare linear search and binary search in terms of accuracy and efficiency.

Answers

Answered by yroli386
4

Explanation:

Linear search can be used on both single and multidimensional array, whereas the binary search can be implemented only on the one-dimensional array. Linear search is less efficient when we consider the large data sets. Binary search is more efficient than the linear search in the case of large data sets.

Answered by milidhireswar45
1

Answer:

Binary search is more efficient than linear search; it has a time complexity of O(log n). The list of data must be in a sorted order for it to work. Binary and linear search algorithms can both be used to find elements in a list using Javascript.

Hope it helps you :)

Similar questions