• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 3 out of 30 pages
Exam (elaborations)

DAT 305 Data Structures for Problem Solving - Finals Mock Exam Review - UOPX 2025

Document preview thumbnail
Preview 3 out of 30 pages

DAT 305 Data Structures for Problem Solving - Finals Mock Exam Review - UOPX 2025DAT 305 Data Structures for Problem Solving - Finals Mock Exam Review - UOPX 2025DAT 305 Data Structures for Problem Solving - Finals Mock Exam Review - UOPX 2025

Content preview

DAT 305 Data Structures for Problem
Solving

Finals Mock Exam Review

(Questions & Solutions)

2025




©2025

, Question 1:
An algorithm is defined by the recurrence:
T(n) = 2T(n/2) + n².
Using the Master Theorem, what is the asymptotic time complexity of
the algorithm?
- A. Θ(n log n)
- B. Θ(n²)
- C. Θ(n² log n)
- D. Θ(n³)

ANS: C. Θ(n² log n)
Rationale: Here, a = 2, b = 2, and f(n) = n². We calculate n^(log_b a) =
n^(log₂2) = n. Since f(n) = n² is asymptotically larger than n by a
polynomial factor (n^(2) vs n^(1)), we check Case 3 of the Master
Theorem. Because f(n) is polynomially larger than n^(log_b a), the time
complexity becomes Θ(f(n) · log n) = Θ(n² log n).

---

Question 2:
Which algorithm design paradigm is best suited for problems that exhibit
overlapping subproblems and an optimal substructure, where storing
intermediate results is beneficial?
- A. Greedy algorithms
- B. Divide-and-conquer
- C. Dynamic programming
- D. Backtracking

ANS: C. Dynamic programming
Rationale: Dynamic programming is ideal when a problem has
overlapping subproblems and optimal substructure. It avoids redundant
computation by caching intermediate results (using memoization or
tabulation).
©2025

, ---

Question 3:
In the context of logical reasoning in computer science, which formal
system extends propositional logic by incorporating quantifiers such as
“for all” (∀) and “there exists” (∃)?
- A. Modal logic
- B. Predicate logic
- C. Fuzzy logic
- D. Intuitionistic logic

ANS: B. Predicate logic
Rationale: Predicate logic (also known as first-order logic) extends
propositional logic by including quantifiers and predicates, enabling
reasoning about properties of objects.

---

Question 4:
The technique used to prove that a recursive algorithm correctly
computes its result for all inputs is known as:
- A. Proof by contradiction
- B. Mathematical induction
- C. Direct proof
- D. Recursive verification

ANS: B. Mathematical induction
Rationale: Mathematical induction is a standard proof technique used
to show that a property holds for all natural numbers, making it ideal for
proving the correctness of recursive algorithms.

---

Question 5:
©2025

Document information

Uploaded on
May 28, 2025
Number of pages
30
Written in
2024/2025
Type
Exam (elaborations)
Contains
Unknown
$14.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

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.
MedGrad
2.6
(5)
Sold
34
Followers
10
Items
3339
Last sold
4 months ago



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

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions