Computer Science, asked by ssopna2001, 7 months ago

Which of the following is not the required condition for a binary search algorithm?

The list must be sorted
There should be direct access to the middle element in any sub list
There must be a mechanism to delete and/or insert elements in the list.
Number values should only be present​

Answers

Answered by kvsaiml67
1

Answer:3

Explanation:

Binary tree log(n)

Answered by anjalin
2

Among the following options, There must be mechanism to delete and/or insert elements in the list is not the required condition for a binary search algorithm.

Explanation for the correct answer:

  • Binary searching refers to a searching algorithm used in a sorted array by continuously dividing the search interval in half.
  • Binary search starts by comparing an element in the middle of the array with the target value.
  • If the target value matches with the element, its position in the array is returned.
  • If the target value is less than the element, the search continues in the lower half of the array.
  • Therefore, the correct answer among all the options is that There must be mechanism to delete and/or insert elements in the list.

(#SPJ3)

Similar questions