考虑以下算法
ALGORITHM Find(A[0..n‐1])
if n ==1 return A[0]
else temp = Find(A[0..n‐2])
if temp ≤ A[n‐1] return temp
else return A[n‐1]
a. What does this algorithm compute?
b. Set up a recurrence relation for the algorithm’s basic operation count and solve it.
这个算法是否返回 A[0],A[0..3],A[0..5],A[0.7],A[0..8],也许对于 n=9?我在正确的轨道上吗?
感谢有人可以给我!谢谢!