Ask Question
1 August, 21:10

Which element would the search element be compared to first, if abinary search were used on the list above?

4

35

44

98

+5
Answers (1)
  1. 1 August, 21:22
    0
    35

    Explanation:

    Binary search is more efficient than linear search, time complexity of binary is 0 (logn) where as linear's 0 (n). In binary search we search from the middle of the array, whereas in linear we start with index 0 until the last.

    4

    35

    44

    98

    List contains 4 elements, for finding the middle element we will divide by 2.

    4/2=2 so at the index 2 - 35 is present, we will start checking from 35.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Which element would the search element be compared to first, if abinary search were used on the list above? 4 35 44 98 ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers