100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

ADAA Final Exam (Main) - C: Verified Answers & Rationale

Rating
5.0
(1)
Sold
-
Pages
26
Grade
A+
Uploaded on
10-02-2025
Written in
2024/2025

ADAA Final Exam (Main) - C: Verified Answers & Rationale

Institution
Exa M
Course
Exa m










Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
Exa m
Course
Exa m

Document information

Uploaded on
February 10, 2025
Number of pages
26
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

1. Which of the following is the primary goal of an algorithm?


a) To minimize time complexity
b) To maximize space complexity
c) To solve a problem step-by-step
d) To ensure the algorithm is complex
Answer: c) To solve a problem step-by-step


Rationale: An algorithm is designed to solve a problem efficiently, step-
by-step, and it should be able to give the correct output for given
inputs.


2. What does Big O notation primarily measure?


a) Space consumption
b) Time complexity
c) Algorithm correctness
d) Memory consumption
Answer: b) Time complexity


Rationale: Big O notation is used to describe the upper bound of an
algorithm’s time complexity, measuring the performance in terms of
input size.


3. Which of the following is a divide-and-conquer algorithm?

,a) Binary Search
b) Bubble Sort
c) Insertion Sort
d) Linear Search
Answer: a) Binary Search


Rationale: Binary Search splits the search space in half and recursively
searches through one half, making it a divide-and-conquer algorithm.


4. In the context of data structures, which one of these is a type of tree
traversal?


a) Insertion
b) Sorting
c) Pre-order
d) Merging
Answer: c) Pre-order


Rationale: Pre-order traversal refers to visiting the root node first,
followed by the left and right subtrees in a binary tree.


5. What is the time complexity of Merge Sort?


a) O(n log n)

, b) O(n^2)
c) O(log n)
d) O(n)
Answer: a) O(n log n)


Rationale: Merge Sort has a time complexity of O(n log n) because it
divides the input array into two halves and recursively sorts them.


6. Which of the following is the worst-case time complexity of Quick
Sort?


a) O(n log n)
b) O(n^2)
c) O(log n)
d) O(n)
Answer: b) O(n^2)


Rationale: In the worst case, Quick Sort has a time complexity of
O(n^2), especially when the pivot elements are poorly chosen (e.g.,
always picking the smallest or largest element).


7. Which of the following is not a stable sorting algorithm?


a) Bubble Sort
b) Merge Sort

Reviews from verified buyers

Showing all reviews
5 months ago

5.0

1 reviews

5
1
4
0
3
0
2
0
1
0
Trustworthy reviews on Stuvia

All reviews are made by real Stuvia users after verified purchases.

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
wefvn gold
View profile
Follow You need to be logged in order to follow users or courses
Sold
4561
Member since
1 year
Number of followers
2
Documents
499
Last sold
3 days ago

5.0

424 reviews

5
415
4
5
3
1
2
2
1
1

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions