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: Verified Answers & Rationale

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

ADAA Final Exam: 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
23
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

1. What does the term "polynomial time" refer to in algorithm
complexity?
A. An algorithm with complexity of O(n^k) for some constant k
B. An algorithm that requires logarithmic steps
C. An algorithm that runs in constant time
D. An algorithm with complexity of O(log n)
Answer: a) An algorithm with complexity of O(n^k) for some constant
k
Rationale: Polynomial time refers to an algorithm whose time
complexity is a polynomial function of the input size, such as O(n^2),
O(n^3), etc.


2. Which of the following is a characteristic of an NP-hard problem?
A. It can be solved in polynomial time
B. It can be solved in exponential time
C. It has no known solution algorithm
D. It can be solved by a greedy approach
Answer: b) It can be solved in exponential time
Rationale: NP-hard problems are known for their difficulty, and solving
them often requires exponential time.


3. Which of the following operations is performed by a Binary Search
Tree (BST)?

,A. Insertions in O(n)
B. Deletions in O(log n)
C. Search in O(n)
D. All of the above
Answer: b) Deletions in O(log n)
Rationale: In a balanced Binary Search Tree (BST), both insertion and
search operations take O(log n), and deletion also happens in O(log n)
in a balanced tree.


4. Which of the following is not an advantage of dynamic
programming?
A. It solves problems with overlapping subproblems
B. It avoids recalculating solutions to subproblems
C. It guarantees an optimal solution
D. It reduces the time complexity to linear time
Answer: d) It reduces the time complexity to linear time
Rationale: Dynamic programming may not always reduce time
complexity to linear time; it is typically used for problems with
overlapping subproblems and optimal substructure but may not always
give linear time solutions.


5. What is the purpose of a "priority queue"?
A. To store elements in a specific order based on priority
B. To organize data in ascending order
C. To efficiently find the smallest element

, D. To store unordered elements
Answer: a) To store elements in a specific order based on priority
Rationale: A priority queue stores elements based on their priority,
with the highest (or lowest) priority element being dequeued first.


6. Which type of graph is used in representing state transitions in finite
state machines?
A. Directed Graph
B. Undirected Graph
C. Tree
D. Bipartite Graph
Answer: a) Directed Graph
Rationale: A Directed Graph is used to represent state transitions in
finite state machines because the edges indicate transitions from one
state to another.


7. In which data structure is the Depth First Search (DFS) algorithm
most commonly used?
A. Queue
B. Stack
C. Array
D. Hash Map
Answer: b) Stack
Rationale: DFS is typically implemented using a stack (either explicitly
or via recursion).

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
6 days ago

5.0

425 reviews

5
415
4
5
3
2
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