What is the order of the following growth function? t(n)= 5nlogn + 20n – 4 A.
The following code segment has ______ time complexity?
for(int i = 0; i < n; i++){
for(int j = 0; j < n: j=j*2){
int val = (j*i);
System.out.println(val)
}
}
A. O(1)
Which Growth function has the highest order?
A. O(n log n)
What is the time complexity of the following loop?
for (int count = 0; count = <n; count ++)
{
for (int count2 = 0; count2 < n; count2++)
{
}
Which of the following has the smallest time complexity?
D. n logn
What does a growth function show?
A. How big a program must be before completed
Software must make efficient use of resources such as _______ and _______ .
A. H
ard Drive, Video Card
Software must make efficient use of resources such as CPU time and memory.
dominant term in the algorithm’s growth function.
growth function.
run.
algorithm’s growth function.
but the dominant term in the algorithm’s growth function.
processing speed by a factor of 10 regardless of the efficiency of the algorithm.
problem size.
and memory.
growth function.
of the body of the loop by how many times the loop will execute.
and outer loops.
algorithm’s growth function.
What is the difference between the growth function of an algorithm and the order
of that algorithm?
Why does speeding up the CPU not necessarily speed up the process by the
same amount?
Linear speedup only occurs if the algorithm has constant order, O(1), or
How do we use the growth function of an algorithm to determine its order?
How do we determine the time complexity of a loop?
How do we determine the time complexity of a method call?