Deck 2: Analysis of Algorithms

ملء الشاشة (f)
exit full mode
سؤال
What is the order of the following growth function? t(n)= 5nlogn + 20n - 4

A) O(1)
B) O(log n)
C) O(n)
D) O(n log n)
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
The following code segment has ______ time complexity? <strong>The following code segment has ______ time complexity?  </strong> A) O(1) B) O(n) C) O(n<sup>2</sup>) D) O(nlogn) <div style=padding-top: 35px>

A) O(1)
B) O(n)
C) O(n2)
D) O(nlogn)
سؤال
Which Growth function has the highest order?

A) O(n log n)
B) O(n2)
C) O(2n)
D) O(log n)
سؤال
What is the time complexity of the following loop?
<strong>What is the time complexity of the following loop?  </strong> A) O(n<sup>2</sup>) B) O(n<sup>3</sup>) C) O(n) D) O(2<sup>n</sup>) <div style=padding-top: 35px>

A) O(n2)
B) O(n3)
C) O(n)
D) O(2n)
سؤال
Which of the following has the smallest time complexity?

A) 3n+5+2n
B) Logn + 2
C) 3n+4
D) n logn
سؤال
What does a growth function show?

A) How big a program must be before completed
B) How many times a program can be re used
C) Time or space utilization relative to the problem size
D) How many lines a program is
سؤال
Software must make efficient use of resources such as _______ and _______ .

A) Hard Drive, Video Card
B) CPU time, Memory
C) CPU time, Video Card
D) Memory, Hard Drive
سؤال
What is the O(_) of this growth function? ______
3n4+n2+3n-867.5309
سؤال
A __ function shows time or space utilization relative to the problem size.
سؤال
Algorithm ______ is a fundamental computer science topic.
سؤال
The ______ of an algorithm is found by eliminating constants and all but the
dominant term in the algorithm's growth function.
سؤال
The order of an algorithm provides an ______ to the algorithm's
growth function.
سؤال
If the algorithm is ______, a faster processor will not help in the long run.
سؤال
The time complexity of a loop is found by multiplying the complexity of the
______ by how many times the loop will execute.
سؤال
The analysis of nested loops must take into account both the ______.
سؤال
The order of an algorithm refers to the ______ of the algorithm's growth function.
سؤال
The order of an algorithm is found by eliminating constants and all but the dominant term in the algorithm's growth function.
سؤال
Speeding up the processor by a factor of 10 will increase the processing speed by a factor of 10 regardless of the efficiency of the algorithm.
سؤال
A growth function shows time or space utilization relative to the problem size.
سؤال
Software must make efficient use of resources such as CPU time and memory.
سؤال
The order of an algorithm provides a lower bound to the algorithm's growth function.
سؤال
If the algorithm is inefficient, a faster processor will help.
سؤال
The time complexity of a loop is found by multiplying the complexity of the body of the loop by how many times the loop will execute.
سؤال
The analysis of nested loops must take into account both the inner and outer loops.
سؤال
The order of an algorithm refers to the asymptotic complexity of the algorithm's growth function.
سؤال
Method calls are always O(n).
سؤال
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?
سؤال
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?
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/31
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 2: Analysis of Algorithms
1
What is the order of the following growth function? t(n)= 5nlogn + 20n - 4

A) O(1)
B) O(log n)
C) O(n)
D) O(n log n)
O(n log n)
2
The following code segment has ______ time complexity? <strong>The following code segment has ______ time complexity?  </strong> A) O(1) B) O(n) C) O(n<sup>2</sup>) D) O(nlogn)

A) O(1)
B) O(n)
C) O(n2)
D) O(nlogn)
O(nlogn)
3
Which Growth function has the highest order?

A) O(n log n)
B) O(n2)
C) O(2n)
D) O(log n)
O(2n)
4
What is the time complexity of the following loop?
<strong>What is the time complexity of the following loop?  </strong> A) O(n<sup>2</sup>) B) O(n<sup>3</sup>) C) O(n) D) O(2<sup>n</sup>)

A) O(n2)
B) O(n3)
C) O(n)
D) O(2n)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
5
Which of the following has the smallest time complexity?

A) 3n+5+2n
B) Logn + 2
C) 3n+4
D) n logn
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
6
What does a growth function show?

A) How big a program must be before completed
B) How many times a program can be re used
C) Time or space utilization relative to the problem size
D) How many lines a program is
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
7
Software must make efficient use of resources such as _______ and _______ .

A) Hard Drive, Video Card
B) CPU time, Memory
C) CPU time, Video Card
D) Memory, Hard Drive
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
8
What is the O(_) of this growth function? ______
3n4+n2+3n-867.5309
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
9
A __ function shows time or space utilization relative to the problem size.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
10
Algorithm ______ is a fundamental computer science topic.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
11
The ______ of an algorithm is found by eliminating constants and all but the
dominant term in the algorithm's growth function.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
12
The order of an algorithm provides an ______ to the algorithm's
growth function.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
13
If the algorithm is ______, a faster processor will not help in the long run.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
14
The time complexity of a loop is found by multiplying the complexity of the
______ by how many times the loop will execute.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
15
The analysis of nested loops must take into account both the ______.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
16
The order of an algorithm refers to the ______ of the algorithm's growth function.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
17
The order of an algorithm is found by eliminating constants and all but the dominant term in the algorithm's growth function.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
18
Speeding up the processor by a factor of 10 will increase the processing speed by a factor of 10 regardless of the efficiency of the algorithm.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
19
A growth function shows time or space utilization relative to the problem size.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
20
Software must make efficient use of resources such as CPU time and memory.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
21
The order of an algorithm provides a lower bound to the algorithm's growth function.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
22
If the algorithm is inefficient, a faster processor will help.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
23
The time complexity of a loop is found by multiplying the complexity of the body of the loop by how many times the loop will execute.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
24
The analysis of nested loops must take into account both the inner and outer loops.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
25
The order of an algorithm refers to the asymptotic complexity of the algorithm's growth function.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
26
Method calls are always O(n).
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
27
What is the difference between the growth function of an algorithm and the order of that algorithm?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
28
Why does speeding up the CPU not necessarily speed up the process by the same amount?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
29
How do we use the growth function of an algorithm to determine its order?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
30
How do we determine the time complexity of a loop?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
31
How do we determine the time complexity of a method call?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.