Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Exam (elaborations)

CSS 200 Foundations of CS - Finals Mock Exam Review - UOPX 2025

Rating
-
Sold
-
Pages
35
Grade
A+
Uploaded on
28-05-2025
Written in
2024/2025

CSS 200 Foundations of CS - Finals Mock Exam Review - UOPX 2025CSS 200 Foundations of CS - Finals Mock Exam Review - UOPX 2025CSS 200 Foundations of CS - Finals Mock Exam Review - UOPX 2025

Content preview

CSS 200 Foundations of Computer
Science

Finals Mock Exam Review

(Questions & Solutions)

2025




©2025

, Question 1:
A sorting algorithm selects the smallest element from an unsorted array
and swaps it with the first unsorted element in each iteration. In the
worst-case scenario, what is the time complexity of this algorithm?
- A. O(n)
- B. O(n log n)
- C. O(n²)
- D. O(2ⁿ)

ANS: C. O(n²)
Rationale: This description characterizes the selection sort algorithm,
whose worst-case (and best-case) time complexity is O(n²) because it
performs roughly n(n–1)/2 comparisons as the array is processed.

---

Question 2:
Which of the following computational models is considered the most
powerful among those discussed in the theory of computation?
- A. Finite automata
- B. Pushdown automata
- C. Turing machines
- D. Linear bounded automata

ANS: C. Turing machines
Rationale: Turing machines are the most powerful model of
computation, capable of simulating any algorithm, and serve as the
standard theoretical basis for defining what is computable.

---

Question 3:
The decision version of the Boolean satisfiability problem (SAT) is
©2025

,significant because it was the first problem to be proven NP-complete.
Which theorem does this result relate to?
- A. Rice’s Theorem
- B. Cook’s Theorem
- C. Gödel’s Incompleteness Theorem
- D. Bellman’s Principle of Optimality

ANS: B. Cook’s Theorem
Rationale: Cook’s Theorem established that the Boolean satisfiability
problem (SAT) is NP-complete, forming the foundation of NP-
completeness theory and its implications for P vs NP.

---

Question 4:
A computer scientist is analyzing an algorithm that solves a problem by
recursively dividing it into two subproblems of equal size. Which
recurrence relation best models the time complexity of this algorithm,
assuming linear time is spent on dividing and combining?
- A. T(n) = 2T(n/2) + O(n)
- B. T(n) = T(n - 1) + O(1)
- C. T(n) = T(n/2) + O(n²)
- D. T(n) = 2T(n/2) + O(1)

ANS: A. T(n) = 2T(n/2) + O(n)
Rationale: This recurrence models divide-and-conquer algorithms (e.g.,
merge sort) where the problem is divided into two equal parts, with O(n)
work required to combine them, resulting in an overall time complexity
of O(n log n).

---

Question 5:
Which of the following is an example of a problem that is proven to be
NP-complete?
©2025

, - A. Sorting a list of numbers
- B. The Traveling Salesman Problem (decision version)
- C. Computing the greatest common divisor (GCD)
- D. Finding the shortest path in a weighted graph

ANS: B. The Traveling Salesman Problem (decision version)
Rationale: The decision version of the Traveling Salesman Problem
(TSP) is NP-complete because it is both in NP and NP-hard. While the
optimization version is NP-hard, the decision version fits the NP-
complete classification.

---

Question 6:
Which algorithm employs dynamic programming to efficiently solve the
problem of finding the longest common subsequence between two
sequences?
- A. Quick sort
- B. Dijkstra’s algorithm
- C. Floyd-Warshall algorithm
- D. LCS (Longest Common Subsequence) algorithm

ANS: D. LCS (Longest Common Subsequence) algorithm
Rationale: The LCS algorithm uses dynamic programming to solve the
problem by breaking the problem into overlapping subproblems and
storing intermediate results, thereby reducing overall computation.

---

Question 7:
Regular languages are defined by regular expressions and can be
recognized by finite automata. Which of the following properties is true
for regular languages?
- A. They are closed under union and concatenation.
- B. They are not closed under complementation.
©2025

Written for

Document information

Uploaded on
May 28, 2025
Number of pages
35
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$15.99
Get access to the full document:

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

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.
MedGrad Walden University
View profile
Follow You need to be logged in order to follow users or courses
Sold
34
Member since
3 year
Number of followers
10
Documents
3345
Last sold
1 month ago

Hi there! I'm a former nursing student who loves to share my knowledge and help others succeed. On this account, you'll find my past study notes and papers for nursing and other programs that I've taken or reviewed. They are high-quality, well-organized and easy to understand. Whether you need a quick refresher, a detailed explanation or a sample essay, I've got you covered. Follow me and get access to the best resources for your studies. Trust me, you won't regret it!

Read more Read less
2.6

5 reviews

5
0
4
0
3
3
2
2
1
0

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