-->
当前位置:首页 > Luz 第2583页
Luz

Luz 管理员

暂无介绍

89860 篇文章 33 次评论

单选题:已知求平方根函数$$sqrt(n)$$的计算在$$O(1)$$时间内完成,下面算法的时间复杂度是( )。

Luz5年前 (2021-06-19)650
已知求平方根函数$$sqrt(n)$$的计算在$$O(1)$$时间内完成,下面算法的时间复杂度是( )。 **Algorithm** PrimalityTest **Input**:$$n, n \geq 2$$ **Outp…

单选题:给定程序时间复杂度的递推公式:$$T(1)=1$$,$$T(N)=2T(N/2)+N$$。则对该程序时间复杂度最接近的描述是:

Luz5年前 (2021-06-19)2165
给定程序时间复杂度的递推公式:$$T(1)=1$$,$$T(N)=2T(N/2)+N$$。则对该程序时间复杂度最接近的描述是: A.$$O(logN)$$ B.$$O(N)$$ C.$$O(NlogN)$$ D.$$O(N^2)$$…

单选题:Given a 2-dimensional array A of size $$N\times N$$. The best d

Luz5年前 (2021-06-19)491
Given a 2-dimensional array A of size $$N\times N$$. The best description of the time complexity for finding the larges…

单选题:Choose the time complexity of the following code:

Luz5年前 (2021-06-19)643
Choose the time complexity of the following code: x=0; for(i=0;i˂n;i++) for(j=0;j˂i*i;j++)…

单选题:In the best case,which is the time complexity for the following

Luz5年前 (2021-06-19)607
In the best case,which is the time complexity for the following code? high=N-1; while(high˃0){…

单选题:If the time complexity of Partition(Data a[],int i,int j) is O(n

Luz5年前 (2021-06-19)417
If the time complexity of Partition(Data a[],int i,int j) is O(n),then which is the time complexity for the following co…

单选题:执行下面程序段时,执行S语句的频度为()。

Luz5年前 (2021-06-19)1638
执行下面程序段时,执行S语句的频度为()。 @[D](2) ``` for(int i=0;i˂n;i++) for(int j=1;j˂=i;j++) S; ``` A. $$n^{2}$$ B. $$n^{2}$$/2…

单选题:下列程序的时间复杂度为()。

Luz5年前 (2021-06-19)738
下列程序的时间复杂度为()。 ``` i = 0; s = 0; while(s ˂ n) { i++; s = s + i; } ``` A.Θ(n½) B.Θ(1) C.Θ(n) D.Θ($$n^2$$) 答案:A…

单选题:设有一组关键字(9,01,23,14,55,20,84,27),采用哈希函数:H(key)=key %7 ,存放在地址0~10范

Luz5年前 (2021-06-19)1047
设有一组关键字(9,01,23,14,55,20,84,27),采用哈希函数:H(key)=key %7 ,存放在地址0~10范围内,用开放地址法的二次探测法处理冲突构造哈希表,查找关键字27,需要比较的次数是( )。 A.1 B.3…

单选题:下列程序段的时间复杂度为()。

Luz5年前 (2021-06-19)730
下列程序段的时间复杂度为()。 ``` x = n; /*n ˃ 1*/ y = 0; while(x ˃= (y + 1) * (y + 1)) y = y + 1; ``` A.Θ(n) B.Θ(n½) C.Θ(…