The iterations that are performed in each algorithm for the function is 5.
Binary search algorithms run faster because of their searching way is based on divide and conquer technique
An algorithm is a limited set of precise instructions that are usually applied to carry out a computation or solve a group of related problems. Calculations and data processing are done according to specifications called algorithms.
Case 1: Linear Search
The number of Iterations is 5, and the returned index value will be 4, that is the after 4th Iteration(that is at 5th) the array element will be matched with the searching element
Case 2: Binary Search
The number of Iterations is 3, and the returned index value will be 4, that is the after 2nd Iteration (that is at 3rd )the array element will be matched with the searching element.
Because there are fewer iterations in the Binary Search algorithm than there are in the Linear Search algorithm, it operates more quickly.
Learn more about algorithm on;
https://brainly.com/question/24953880
#SPJ1