Design & Analysis of Algorithms Past Paper 2024 – BS 4th Term (UOS)

University: University of Sargodha (UOS)
Program: BS 4th Term
Subject: Design & Analysis of Algorithms (CSCC-202)
Year: 2024
Time Allowed: 2 Hours 30 Minutes
Maximum Marks: 60
Why Use This Algorithms Past Paper?
This past paper helps students understand exam format, important topics and commonly repeated questions. Practicing past papers improves problem solving speed and confidence.
- Understand algorithm concepts
- Practice short definitions
- Prepare complex algorithm problems
- Improve exam writing technique
Design & Analysis of Algorithms Past Paper 2024 (Complete)
Note: Objective part is compulsory. Attempt any three questions from subjective part.
Objective Part (Compulsory)
Q.1 Write short answers of the following in 2–3 lines each. (2×12)
- What is a loop invariant?
- Define average case complexity.
- Other than speed, what measures of efficiency are useful?
- What is an in-place algorithm?
- Give a recurrence describing worst-case binary search.
- Is 2n+1 = O(2n)? Explain.
- Does the array 20,15,18,7,9,5,12,3,6,2 form a max-heap?
- Can heapsort be used as auxiliary sorting in radix sort?
- What is a pseudograph?
- How many vertices are in Cn graph?
- Advantages of adjacency list vs adjacency matrix?
- Insertion cost for inserting into max-heap?
Subjective Part (Attempt any Three)
Q.2 Algorithm to locate last occurrence of largest number.
Q.3 Sort array of −1, 0, 1 in O(n).
Q.4 Algorithm to check path existence in directed graph.
Q.5 Detect positive cycle in directed acyclic graph.
Q.6 Single-source longest path in DAG.
Download
Download Algorithms Past Paper 2024 (PDF)
Related Past Papers
More papers coming soon – stay connected!
Short Question Solutions
Click to view answers:
1. What is a loop invariant?
A loop invariant is a logical condition that remains true before and after every iteration of a loop. It is used to prove correctness of algorithms.Reference: CLRS – Introduction to Algorithms
2. Define average case complexity.
Average-case complexity measures expected running time of an algorithm over all possible valid inputs of given size.Reference: GeeksforGeeks – Algorithm Analysis