当前位置:首页
> Luz 第2576页
Luz 管理员
暂无介绍
89860 篇文章 33 次评论单选题:用于求最小生成树的Prim算法和Kruskal算法都是基于( )思想设计的算法。
用于求最小生成树的Prim算法和Kruskal算法都是基于( )思想设计的算法。 A.分治算法 B.穷举 C.贪心算法 D.回溯算法 答案:C…
单选题:40、有以下程序
40、有以下程序 ``` #include main() { FILE *fp; char str[10]; fp=fopen("myfile.dat","w"); fputs("abc",fp);…
单选题:39、若变量已正确定义,则以下语句的输出结果是
39、若变量已正确定义,则以下语句的输出结果是 ``` s=32; s^=32; printf("%d",s); ``` @[B](1) A. -1 B. 0 C. 1 D. 32 A.-1 B.0 C.1 D.32 答案…
单选题:38、若程序中有宏定义行:
38、若程序中有宏定义行: `#define N 100` 则以下叙述中正确的是 @[B](1) A. 宏定义行中定义了标识符N的值为整数100 B. 在编译程序对C源程序进行预处理时用100替换标识符N C. 上述宏定义行实现将1…
单选题:The recurrent equations for the time complexities of programs P1
The recurrent equations for the time complexities of programs P1 and P2 are: - P1: $$T(1)=1$$, $$T(N)=T(N/2)+1$$; - P2:…
单选题:程序P1和P2时间复杂度的递推公式:
程序P1和P2时间复杂度的递推公式: P1: $$T(1)=1$$, $$T(N)=T(N/2)+1$$; P2: $$T(1)=1$$, $$T(N)=2T(N/2)+1$$; 则下列关于两程序时间复杂度的结论中最准确的是:…
单选题:给定$$N\times N\times N$$的三维数组A,则在不改变数组的前提下,查找最小元素的时间复杂度是:
给定$$N\times N\times N$$的三维数组A,则在不改变数组的前提下,查找最小元素的时间复杂度是: A.$$O(N^2)$$ B.$$O(NlogN)$$ C.$$O(N^2 logN)$$ D.$$O(N^3)$$ 答…
单选题:已知求平方根函数$$sqrt(n)$$的计算在$$O(1)$$时间内完成,下面算法的时间复杂度是( )。
已知求平方根函数$$sqrt(n)$$的计算在$$O(1)$$时间内完成,下面算法的时间复杂度是( )。 **Algorithm** PrimalityTest **Input**:$$n, n \geq 2$$ **Outp…
单选题:Given a 2-dimensional array A of size $$N\times N$$. The best d
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:
Choose the time complexity of the following code: x=0; for(i=0;i˂n;i++) for(j=0;j˂i*i;j++)…