填空题

对于长度为n的有序线性表,在最坏情况下,二分查找需要比较log2n,那么顺序查找需要比较的次数是 【2】 。

【参考答案】

n
<上一题 目录 下一题>
热门 试题

单项选择题
有以下程序: #include <iostream> using namespace std; class myclass private: int a, b; public: void init( int i, int j ) a = i; b = j; friend int sum( myclass x ); ; int sum( myclass x ) return x.a + x.b; int main () myclass y; y.init( 15, 20 ); cout<<sum( y )<<end1; return 0; 执行后的输出结果是( )。
A.15
B.20
C.5
D.35
填空题
关系模型的四种基本操作为插入、删除、修改和 【4】 。
相关试题
  • 下面程序的运行结果为 【13】 。 #in...
  • 如果一个函数模板声明列出了多个参数,则每...
  • 有如下程序: #include <iostream> u...
  • 有以下程序: #include <iostream> ...
  • 表达式x=operator-(y,z)还可以表示为...