Question: Question 3 ( 5 points ) : Purpose: To understand the behaviour of searching algorithms Consider the already sorted list ( L )

Question 3(5 points):
Purpose: To understand the behaviour of searching algorithms
Consider the already sorted list \( L \) shown and above. WHICH elements will be examined and in what ORDER when conducting a...
1. linear search when searching for the value 15?
2. linear search when searching for the value 42?
3. binary search when searching for the value 5?
4. binary search when searching for the value 99?
5. binary search when searching for the value 42?
For Linear Search, assume the search starts from the front (i.e. index 0). For Binary Search, assume we round the index down if needed to find the middle.
What to Hand In
Hand in your solution in a file called a5q3.pdf (.doc, .png..jpg are also ok).
Evaluation
-1 mark for each search query
Question 3 ( 5 points ) : Purpose: To understand

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!