文档下载 文档下载导航
设为首页 | 加入收藏
搜索 请输入内容:  
 导航当前位置: 文档下载 > 所有分类 > 高等教育 > 理学 > 数据结构题库
侵权投诉

数据结构题库

Correct answer is (c)

7. Using a backtracking technique to solve a problem typically involves

(a) starting with the set of all possible solutions and working backwards from each to determine which is the actual solution

(b) using concurrency to check several possible solutions simultaneously

(c) using a breadth-first strategy to search the problem space

(d) pursuing a possible solution until it is found to be a solution or a non-solution Correct answer is (d)

8. A backtracking algorithm is one that

(a) uses loops to iterate through all possible solutions for a problem

(b) uses recursion to test all possible solutions for a problem

(c) uses a binary search to solve a problem

(d) splits a problem into two equal halves and uses recursion to solve each half

Correct answer is (b)

9. A divide-and-conquer algorithm typically makes use of

(a) integer division

(b) recursion

(c) iteration through looping

(d) floating-point division

Correct answer is (b)

10. Consider the following C++ function that uses a divide and conquer approach to calculate the sum of a range of numbers.

int sum(int i, int j) {

if (i == j) {

return i;

}

else {

int mid = (i+j) / 2;

int result = sum(i,mid) + sum(mid+1,j);

return result;

}

}

Which of the following lines of code from the above function divides this problem into sub-problems?

(a) int result = sum(i,mid) + sum(mid+1,j);

(b) int mid = (i+j) / 2;

(c) if (i == j) {

(d) return result;

Correct answer is (a)

上一页第4页

你可能喜欢

热门文档

相关文档

  • 数据结构试题库集及答案

    数据结构试题库集及答案_IT认证_资格考试/认证_教育专区。数据结构试题库及答案 第一章 概论一、选择题 1、研究数据结构就是研究( D )。 A. 数据的逻辑结构 ...

  • 数据结构题库

    第一章 概论一、选择题 1、研究数据结构就是研究( D )。 A. 数据的逻辑结构 B. 数据的存储结构 C. 数据的逻辑结构和存储结构 D. 数据的逻辑结构、存储...

  • 数据结构试题库答案

    数据结构试题库答案 隐藏>> 数据结构试题及答案 一、单项选择题 (1) 一个算法应该是( A) 程序 C) 要满足五个基本属性 (2) 算法指的是( A) 计算机程序 ...

  • 数据结构试题库答案

    数据结构试题库答案_理学_高等教育_教育专区。一些试题数据结构试题及答案一、单项选择题 (1) 一个算法应该是( A) 程序 C) 要满足五个基本属性 (2) 算法指的...

  • 数据结构试题库

    数据结构试题库_工学_高等教育_教育专区。数据结构一、选择题 1.采用折半查找方法进行查找,数据文件应为( A.有序表 顺序存储结构 C.随机表 顺序存储结构 2.算法...

  • 数据结构试题库(复习题)

    线性,树,图 3.数据结构 S 中:元素的集合为:{A,B,C,D,E,F,G,H,I},关系的集合为:{<A,B>, <A,C>, <B,D>, <B,E>, <B,F>, <C,G>, ...

  • 数据结构试题库及答案

    数据结构试题库及答案_工学_高等教育_教育专区。数据结构试题库及答案一、单选题(每题 2 分,共 20 分) 1.栈和队列的共同特点是( A )。 A.只允许在端点处...

  • 数据结构题库

    数据结构题库 数据结构题数据结构题隐藏>> 第一章 绪论 一、选择题 1、数据结构是一门研究非数值计算的程序设计问题中计算机的 ① A、数据元素 ② A、结构 B...

  • 数据结构题库

    数据结构题库数据结构题库隐藏>> 第1 章 绪论一、选择题 1. 算法的计算量的大小称为计算的( )。 A.效率 B. 复杂性 C. 现实性 D. 难度 2. 算法的时间...

站点地图 | 文档上传 | 侵权投诉 | 手机版
本站所有资源均来自互联网,本站只负责收集和整理,均不承担任何法律责任,如有侵权等其它行为请联系我们.
文档下载 Copyright 2013 doc.guandang.net All Rights Reserved.  -  email