Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Can some body help me with these questions please! In the recursive algorithm fo

ID: 3679159 • Letter: C

Question

Can some body help me with these questions please!

In the recursive algorithm for the nth Fibonacci number, there are base case(s). Suppose that sequential search as discussed in the book is used to determine whether 2 is in list. Exactly how many key comparisons are executed by the sequential search algorithm? Based on the accompanying figure, in a sequential search, what is the minimum number of comparisons that have to be made if the search item was 10? Why can't a binary search be used on the list as it appears in the accompanying figure?

Explanation / Answer

Q20. There are two base cases: one for t=0, where sum is 0 , and for t=1, where sum is 1.

Q21. 4 comparisons.2 with 20, 10,17,2.

Q22. 7 comparisons. 10 with 35, 12,27,18,45,16,38.

Q23. Becuase the list is not sorted.