山东科技大学
第一章
The algorithm and flowchart can help us to
To store the data

Specify the problem completely and clearly

Identify the data type of a variable

答案:Specify the problem completely and clearly
The rhombus or diamond shape in flowcharting denotes
Initialization

Input

Decision

答案:Decision
Which of the following is not an advantage of a flowchart?
Efficient coding

Systematic testing

Improper documentation

答案:Improper documentation
The flowchart symbols used for start and stop operations are called as_______.
connectors
terminals

processing

答案:terminals
The formula Fn = Fn-1+Fn-2 will produce
Ramanujan Number

Euler Number

Fibonacci Number

答案:Fibonacci Number
The main measures for the efficiency of an algorithm are
Processor and memory

Time and space

Complexity and capacity

答案:Time and space
Which one of the following is the constant time complexity in terms of Big-Oh notation
O(1)

O(n2)

O(n3)

答案:O(1)
What is the time complexity of the following code? int a=0; for(i=0;i<n;i++){ for(j=n;j>i;j--){ a=a+i+j;}}
O(1)

O(n2)

O(nlogn)

答案:O(n2)
Which one of the following is an example for exponential time complexity?
O(n)

O(2n)

O(n2)

答案:O(2n)
For larger values of n, which one represents the slowest time?
O(n!)

O(n2)

O(2n)

答案:O(n!)

温馨提示支付 ¥3.00 元后可查看付费内容,请先翻页预览!
点赞(0) dxwkbang
返回
顶部