11、在数组A[0..n-1]中查找给定值K的算法大致如下: i=n-1; while(i>=0 && (A[i]!=k)) i--; return i; 该算法的时间复杂度为()。

A.O(n-i+1) B.O(n-i) C.O(n) D.无法确定

时间:2024-04-30 14:11:11

相似题目