CS 3304 GRADED QUIZ UNIT 3 | QUESTIONS AND ANSWERS | LATEST UPDATE |
100% CORRECT.
Started on Wednesday, 24 September 2025, 1:26 PM
State Finished
Completed on Wednesday, 24 September 2025, 1:37 PM
Time taken 11 mins 30 secs
Marks 15.00/15.00
Grade 100.00 out of 100.00
Question 1
Correct
Mark 1.00 out of 1.00
The greedy choice property refers to:
Making a choice that seems best at the current moment.
a0 oo
Always selecting the largest element.
Selecting the element with the smallest value.
Randomly choosing an element.
The correct answer is: Making a choice that seems best at the current moment.
Question 2
Correct
Mark 1.00 out of 1.00
How does the Merge Sort algorithm handle the "Divide" step?
Divides the array into halves until single-element arrays are achieved. v
o
Sorts each individual element before merging.
lterates over the aray and sorts it directly.
e o
Finds the pivot point for splitting into uneven parts.
The correct answer is: Divides the array into halves until single-element arrays are achieved.
Question 3
Correct
Mark 1.00 out of 1.00
Anon-recursive algorithm with a linear number of operations always has a time complexity of O(n). Is this statement True or False?
a. True v
b. False
The correct answer is: True
, Question 4
Correct
Mark 1.00 out of 1.00
In the recurrence relation T(n)=T(n-1) +O(1), what is the time complexity of the algorithm?
O(n) v
2o oo
O(log n)
O(n?)
o(1)
The correct answer is: O(n)
Question 5
Correct
Mark 1.00 out of 1.00
The recurrence relation T(n)=2T(n/2) +O(n) is an example of which common algorithm?
Merge sort v
a0 oo
Quick sort
Insertion sort
Selection sort
The correct answer is: Merge sort
Question 6
Correct
Mark 1.00 out of 1.00
Which data structure is most suitable for efficiently implementing the greedy fractional knapsack algorithm?
a. Heap (Priority Queue) »
b. Stack
c. Queue
d. Linked List
The correct answer is: Heap (Priority Queue)
100% CORRECT.
Started on Wednesday, 24 September 2025, 1:26 PM
State Finished
Completed on Wednesday, 24 September 2025, 1:37 PM
Time taken 11 mins 30 secs
Marks 15.00/15.00
Grade 100.00 out of 100.00
Question 1
Correct
Mark 1.00 out of 1.00
The greedy choice property refers to:
Making a choice that seems best at the current moment.
a0 oo
Always selecting the largest element.
Selecting the element with the smallest value.
Randomly choosing an element.
The correct answer is: Making a choice that seems best at the current moment.
Question 2
Correct
Mark 1.00 out of 1.00
How does the Merge Sort algorithm handle the "Divide" step?
Divides the array into halves until single-element arrays are achieved. v
o
Sorts each individual element before merging.
lterates over the aray and sorts it directly.
e o
Finds the pivot point for splitting into uneven parts.
The correct answer is: Divides the array into halves until single-element arrays are achieved.
Question 3
Correct
Mark 1.00 out of 1.00
Anon-recursive algorithm with a linear number of operations always has a time complexity of O(n). Is this statement True or False?
a. True v
b. False
The correct answer is: True
, Question 4
Correct
Mark 1.00 out of 1.00
In the recurrence relation T(n)=T(n-1) +O(1), what is the time complexity of the algorithm?
O(n) v
2o oo
O(log n)
O(n?)
o(1)
The correct answer is: O(n)
Question 5
Correct
Mark 1.00 out of 1.00
The recurrence relation T(n)=2T(n/2) +O(n) is an example of which common algorithm?
Merge sort v
a0 oo
Quick sort
Insertion sort
Selection sort
The correct answer is: Merge sort
Question 6
Correct
Mark 1.00 out of 1.00
Which data structure is most suitable for efficiently implementing the greedy fractional knapsack algorithm?
a. Heap (Priority Queue) »
b. Stack
c. Queue
d. Linked List
The correct answer is: Heap (Priority Queue)