Sample Paper_CS502.docx

Verified academic study resource for CS502 (Fundamentals of Algorithms) under the Computer Science at Virtual University of Pakistan. This DOC document (Mega Solved MCQs Question Bank) covers Full Course Curriculum spanning approximately 180 pages across 8 curriculum modules, and is indexed for student examination review with instant in-browser preview and 100% free direct download.

Course
CS502 – Fundamentals of Algorithms
Faculty
Computer Science
Format
DOC
Type
MCQ Bank
Coverage
Full Course Curriculum

Cross-verify solutions against official lecture handouts. Practice active recall before checking answers to ensure true concept retention.

What this file covers — CS502 syllabus roadmap

  1. Core Architecture, Syntax & Primitive Data Structures — Lectures 1 to 6 (Pages 1 to 65). 15% Objective Marks (8–10 MCQs)
  2. Conditional Branching, Loops & Logical Control Flow — Lectures 7 to 12 (Pages 66 to 140). 18% Exam Marks (MCQs + 2-Mark Short Questions)
  3. Memory Management, Pointers, Arrays & Functions — Lectures 13 to 18 (Pages 141 to 215). 22% Exam Marks (High Yield for Midterms)
  4. Midterm Consolidation, Strings & Algorithm Synthesis — Lectures 19 to 22 (Pages 216 to 280). Midterm Exam Culmination (Lectures 1–22 Scope)
  5. Object-Oriented Paradigms: Classes & Data Abstraction — Lectures 23 to 29 (Pages 281 to 360). 16% Final-Term Marks (Core OO Concepts)
  6. Inheritance Hierarchies & Dynamic Polymorphism — Lectures 30 to 36 (Pages 361 to 435). 20% Final-Term Marks (Virtual Functions & V-Tables)
  7. Templates, Standard Library & Persistent File I/O — Lectures 37 to 41 (Pages 436 to 510). 14% Final-Term Marks (Generic Code & Streams)
  8. Final-Term Examination Dossier & Capstone Synthesis — Lectures 42 to 45 (Pages 511 to 585). Final-Term Exam Synthesis (Lectures 23–45 Scope)

Frequently asked questions

Where can I download Sample Paper_CS502.docx for free?

You can preview and download "Sample Paper_CS502.docx" (CS502 DOC, ~180 pages) directly from the MIHORA VU Study Library (https://study.mihora.tech/doc/sample-paper-cs502-docx) with 100% free high-speed downloads and zero registration requirements.

What syllabus chapters and lectures are covered in this CS502 file?

This document covers Full Course Curriculum across 8 distinct lecture units (Lectures 1 to 6, Lectures 7 to 12, Lectures 13 to 18, Lectures 19 to 22, Lectures 23 to 29, Lectures 30 to 36, Lectures 37 to 41, Lectures 42 to 45), featuring comprehensive definitions, solved objective questions, and examiner marking rubrics.

What is the passing criteria for CS502 under the VU 20% Two-Half Rule?

Under official Virtual University regulations, students must score at least 20% in the First Half (Quizzes, Assignments, GDBs, and Midterm combined) AND independently at least 20% in the Final-Term examination paper. Scoring under 20% in the final exam results in an automatic F grade regardless of earlier marks.

Are CS502 solved past papers and handouts verified for 2026 exams?

Yes. All CS502 materials on MIHORA VU—including Moaaz, Waqar Siddhu, and team archives—are reviewed against the current VU syllabus to help students prepare for 2026 Midterm, Final-Term, and online quiz examinations.

Inside this file

Sample Paper
 FINALTERM  EXAMINATION
Fall 2022
CS502 - Fundamentals of Algorithms


Time: 90 min
Marks: 60

Question No: 1      (Marks: 01) - Please choose the correct option


Matrix chain multiplication is a/an___________ type of problem.

    a) Search Problem
    b) Computational Problem
    c) Optimization Problem
    d) Parallel Computation Problem

Question No: 2      (Marks: 01) - Please choose the correct option


Dynamic Programming Algorithms involves solving the problem by________.

    a)  Breaking up into sub-problems
    b)  Only One Individual problem
    c)  One Part of problem
    d)  Starting from the first part of problem

Question No: 3     (Marks: 01) - Please choose the correct option


Matrix chain multiplication is a/an___________ type of problem.

    a) Search Problem
    b) Computational Problem
    c) Optimization Problem
    d) Parallel Computation Problem

Question No: 4     (Marks: 01) - Please choose the correct option

The Knapsack problem is an example of ____________.

a) Greedy algorithm
b) 2 D dynamic programming
c) 1 D dynamic programming
d) Divide and conquer

Question No: 5     (Marks: 01) - Please choose the correct option

You are given a knapsack that can carry a maximum weight of 60. There are 4 items with weights {20, 30, 40, 70} and values {70, 80, 90, 200}. What is the maximum value of the items you can carry using the knapsack?

a) 160
b) 200
c) 170
d) 90

Question No: 6     (Marks: 01) - Please choose the correct option

Which of the following algorithms is the best approach for solving Huffman codes?

a) exhaustive search
b) greedy algorithm
c) brute force algorithm
d) divide and conquer algorithm

Question No: 7     (Marks: 01) - Please choose the correct option

From the following given tree, what is the computed codeword for ‘c’?

a) 111
b) 101
c) 110
d) 011

Question No: 8     (Marks: 01) - Please choose the correct option

Fractional knapsack problem is solved most efficiently by which of the following algorithm?

a) Divide and conquer
b) Dynamic programming
c) Greedy algorithm
d) Backtracking

Question No: 9    (Marks: 01) - Please choose the correct option

The main time taking step in fractional knapsack problem is ___________.

a) Breaking items into fraction
b) Adding items into knapsack
c) Sorting
d) Looping through sorted items

Question No: 10    (Marks: 01) - Please choose the correct option

Which bit is reserved as a parity bit in an ASCII set?
a) first
b) seventh
c) eighth
d) tenth

Question No: 11    (Marks: 01) - Please choose the correct option

What does the Activity Selection Problem mean__________?

    A) Scheduling Problem
    B) Search Problem
    C) Computational Problem
    D) Non Computational Problem

Question No: 12    (Marks: 01) - Please choose the correct option
You are given infinite coins of denominations v1, v2, v3,…..,vn and a sum S. The coin change problem is to find the minimum number of coins required to get the sum S. This problem can be solved using ____________.
a) Greedy algorithm
b) Dynamic programming
c) Divide and conquer
d) Backtracking
Question No: 13    (Marks: 01) - Please choose the correct option
You are given infinite coins of N denominations v1, v2, v3,…..,vn and a sum S. The coin change problem is to find the minimum number of coins required to get the sum S. What is the time complexity of a dynamic programming implementation used to solve the coin change problem?
a) O(N)
b) O(S)
c) O(N2)
d) O(S*N)
Question No: 14    (Marks: 01) - Please choose the correct option

What is the fractional knapsack problem?
    a) A problem in computer science that deals with sorting algorithms
    b) A problem in mathematics that deals with dividing a line segment into a given number of equal parts
    c) A problem in optimization that deals with selecting items to include in a knapsack so as to maximize the total value of items in the knapsack
    d) A problem in physics that deals with calculating the force exerted by a gas on a container

Question No: 15     (Marks: 01) - Please choose the correct option

What is the objective of the fractional knapsack problem?
    a) To find the minimum weight of items that can be selected to fill the knapsack
    b) To find the maximum weight of items that can be selected to fill the knapsack
    c) To find the minimum value of items that can be selected to fill the knapsack
    d) To find the maximum value of items that can be selected to fill the knapsack

Question No: 16    (Marks: 01) - Please choose the correct option

What is the key difference between the 0/1 knapsack problem and the fractional knapsack problem?
    a) The 0/1 knapsack problem allows items to be broken into parts, while the fractional knapsack problem does not
    b) The 0/1 knapsack problem requires items to be taken in their entirety, while the fractional knapsack problem allows items to be taken in fractional amounts
    c) The 0/1 knapsack problem only allows items to be taken in whole numbers, while the fractional knapsack problem allows items to be taken in any amount
    d) The 0/1 knapsack problem is much easier to solve than the fractional knapsack problem

Question No: 17    (Marks: 01) - Please choose the correct option

A free tree does not have _______________ node/vertex.
    a) Root
    b) Left child
    c) Right child
    d) Leaf

Question No: 18     (Marks: 01) - Please choose the correct option

The number of edges in a Minimum Spanning Tree (MST) is _____________ the number of edges in the original graph.

    a) Greater than
    b) Less than or greater than
    c) Subset of
    d) Equal to

Question No: 19   (Marks: 01) - Please choose the correct option

The number of vertices in a Minimum Spanning Tree (MST) is _____________ the number of vertices in the original graph.

    a) Less than
    b) Greater than
    c) Subset of
    d) Equal to

Question No: 20    (Marks: 01) - Please choose the correct option

Kruskal’s algorithm is used for computing Minimum Spanning Tree (MST) and is based on ____________ strategy.

    a) Dynamic Programming
    b) Greedy
    c) Divide and Conquer

More CS502 files

All CS502 files · Midterm Prep 2026 · MCQs Bank