• 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 4 out of 59 pages
Exam (elaborations)

IT24111 & Problem Solving Techniques: Comprehensive Advanced Exam on Algorithmic Paradigms, Computational Complexity, Heuristic Search, Debugging, and Constraint Processing (2026, Week 23)

Document preview thumbnail
Preview 4 out of 59 pages

IT24111 & Problem Solving Techniques: Comprehensive Advanced Exam on Algorithmic Paradigms, Computational Complexity, Heuristic Search, Debugging, and Constraint Processing (2026, Week 23)

Content preview

IT24111 & Problem Solving Techniques: Comprehensive Advanced
Exam on Algorithmic Paradigms, Computational Complexity,
Heuristic Search, Debugging, and Constraint Processing (2026,
Week 23)




Questions 1–150 (Multiple Choice)

1. Which of the following best defines a greedy algorithm?
A) Explores all possible solutions systematically
B) Makes the locally optimal choice at each stage with the hope of
finding global optimum
C) Solves subproblems independently and combines them
D) Stores results of subproblems to avoid recomputation

Correct Answer: B
Rationale: Greedy algorithms choose the best immediate option,
not necessarily optimal globally.




2. In computational thinking, abstraction allows a programmer to:
A) Break a problem into smaller pieces
B) Ignore irrelevant details to focus on essential concepts
C) Recognize patterns across different problems
D) Design step‑by‑step instructions

Correct Answer: B
Rationale: Abstraction hides complexity and highlights only

,relevant information.




3. Which search algorithm is optimal for a weighted graph with
non‑negative edges?
A) Depth‑first search
B) Breadth‑first search
C) Uniform cost search (Dijkstra)
D) Greedy best‑first search

Correct Answer: C
Rationale: Uniform cost search expands node with lowest path cost;
optimal for non‑negative weights.




4. The master theorem is used to solve recurrences of the form:
A) T(n) = aT(n/b) + f(n)
B) T(n) = T(n-1) + T(n-2)
C) T(n) = nT(n/2)
D) T(n) = √n T(√n) + n

Correct Answer: A
Rationale: Master theorem applies to divide‑and‑conquer
recurrences.




5. What is the worst‑case time complexity of bubble sort?
A) O(n)

,B) O(n log n)
C) O(n²)
D) O(log n)

Correct Answer: C
Rationale: Bubble sort repeatedly swaps adjacent elements; worst
case is quadratic.




6. In the 0/1 knapsack problem, dynamic programming is preferred
over greedy because:
A) Greedy never works for any knapsack variant
B) Greedy fails to guarantee optimality for fractional items
C) Greedy fails for 0/1 knapsack due to discrete nature
D) DP is always faster

Correct Answer: C
Rationale: Greedy by value/weight ratio fails for 0/1 knapsack; DP
ensures optimality.




7. Which heuristic for the 8‑puzzle is admissible?
A) Manhattan distance multiplied by 2
B) Number of misplaced tiles
C) Euclidean distance without considering obstacles
D) Both B and C are admissible

Correct Answer: D (both B and C are admissible)
Rationale: Misplaced tiles ≤ true cost; Euclidean distance ≤ true

, cost (ignores obstacles).




8. A backtracking algorithm for N‑Queens prunes branches when:
A) A queen is under attack
B) A queen is placed safely
C) All queens are placed
D) No more rows exist

Correct Answer: A
Rationale: Pruning occurs when a partial assignment violates
constraints.




9. The time complexity of the Bellman‑Ford algorithm on a graph
with V vertices and E edges is:
A) O(V + E)
B) O(VE)
C) O(V²)
D) O(E log V)

Correct Answer: B
Rationale: Bellman‑Ford relaxes all edges V‑1 times.




10. Which debugging technique is most effective for intermittent
bugs in multi‑threaded code?
A) Printf debugging

Document information

Uploaded on
June 9, 2026
Number of pages
59
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
$24.49

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.
TopMarkStudyHub
2.5
(2)
Sold
21
Followers
0
Items
2363
Last sold
6 days 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