CS301-FinalTerm-Solved-Subjectives-By-Moaaz.pdf

Verified academic study resource for CS301 (Data Structures) under the Computer Science at Virtual University of Pakistan. This PDF document (Final-Term Solved Past Paper & Examination Pack compiled by Moaaz Siddhu) covers Final-Term Exam Scope (Lectures 23 to 45) spanning approximately 320 pages across 4 curriculum modules, and is indexed for student examination review with instant in-browser preview and 100% free direct download.

Course
CS301 – Data Structures
Faculty
Computer Science
Format
PDF
Type
Final-Term
Coverage
Final-Term Exam Scope (Lectures 23 to 45)
Compiled by
Moaaz Siddhu
Tags
SUBJECTIVE, SOLVED, FINALTERM

Virtual University regulations strictly require achieving at least 20% marks in the Final-Term exam paper alone (typically 12+ marks out of 60) to pass CS301, regardless of midterm scores.

What this file covers — CS301 syllabus roadmap

  1. Object-Oriented Paradigms: Classes & Data Abstraction — Lectures 23 to 29 (Pages 281 to 360). 16% Final-Term Marks (Core OO Concepts)
  2. Inheritance Hierarchies & Dynamic Polymorphism — Lectures 30 to 36 (Pages 361 to 435). 20% Final-Term Marks (Virtual Functions & V-Tables)
  3. Templates, Standard Library & Persistent File I/O — Lectures 37 to 41 (Pages 436 to 510). 14% Final-Term Marks (Generic Code & Streams)
  4. 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 CS301-FinalTerm-Solved-Subjectives-By-Moaaz.pdf for free?

You can preview and download "CS301-FinalTerm-Solved-Subjectives-By-Moaaz.pdf" (CS301 PDF, ~320 pages) directly from the MIHORA VU Study Library (https://study.mihora.tech/doc/cs301-finalterm-solved-subjectives-by-moaaz-pdf-3) with 100% free high-speed downloads and zero registration requirements.

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

This document covers Final-Term Exam Scope (Lectures 23 to 45) across 4 distinct lecture units (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 CS301 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 CS301 solved past papers and handouts verified for 2026 exams?

Yes. All CS301 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

                                        CS301- Data Structures
                                        LATEST SOLVED SUBJECTIVES                            Feb 06,2012
                                         FROM FINALTERM PAPERS

  Cs301 - subjective       Mc100401285                      moaaz.pk@gmail.com                      Final Term

                                   FINALTERM EXAMINATION 2010
Question No:1
name of two divide and conquer algorithm (2 marks)
 Answer:- (Page 488)
    Merge Sort
    Quick Sort
    Heap Sort
These three algorithms fall under ‗divide and conquer category‘.

Question No:2
difference between call by value n call by reference (2 marks)
 Answer:- (Page 202)
 In case of call by value, a copy of object is made and placed at the time of function calling in the activation
 record. By using the references, we are not making the copy but send the address of the variable that function
 can use the original value.

Question No:3
heap and two types of heap(3)
 Answer:- (Page 333 )
 Heap is a data structure of big use and benefit. It is used in priority queue. ―The definition of heap is that it is a
 complete binary tree that conforms to the heap order‖. Here heap order means the min and max heap. Max
 heap: In max heap, each node has a value greater than the value of its left and right child nodes. Moreover, the
 value of the root will be largest and will become lesser at downward levels. Min heap: in a (min) heap for
 every node X, the key in the parent is smaller than (or equal to) the key in X. This means that the value in the
 parent node is less than the value on its children nodes.

Question No:4
height of a tree is 5 find sum of heights (2)
Answer:-
 Height = 5

 Nodes = 2^h = 2^5 =32
 Sum of Nodes = N-(h+1)= 32-(5+1) = 32-6 = 26

Question No: 5
Here is an array with exactly 15 elements:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15.
Suppose that we are doing a binary search for an element. Indicate any elements that will be found by
examining two or fewer numbers from the array.        (Marks: 5)

Answer:- Click here for detail
If there is an array of 15 elements, {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}
it wants to know which elements can be discovered by examining two or fewer elements. I want assume the
divide and conquer aspect of a binary search, so that leads me to think these elements will be found
1, 2, 14, 15, 7, 3

rather; 1, 2, 3, 4, 6, 8, 14, 15
1 and 15 for heads and tails
2, and 14 for next elements (following or preceding)
1/2 of 15 is either 6, or 8, from 7.5
and 1/2 of 6 = 3
1/2 8 = 4

 Note: - I am not sure about answer; I feel Question logic is not clear.

                                  FINALTERM EXAMINATION 2010

Q1 Write one example of hashing?
Answer: (page 459)
Hashing can be used to store the data. Suppose we have a list of fruits. The names of Fruits are in string. The
key is the name of the fruit. We will pass it to the hash Function to get the hash key.
HashCode ("apple") = 5
We pass it to the string ―apple‖. Resultantly, it returns a number 5.

Q2 Height of a tree is 5 find sum of heights
 Answer:- rep

Q3 How do we carry out degeneration of Complete Binary Tree?
Answer: Click here for detail
Degeneration of the (original) binary tree is mainly reflected by degeneration of the internal infix trees and less

by degeneration of the external height of the PPbin tree.

Q4 What is a skip List?
Answer:- (Page 446)
A skip list for a set S of distinct (key, element) items is a series of lists S0, S1 , … , Sh such that

• Each list Si contains the special keys +∞ and -∞
• List S0 contains the keys of S in non-decreasing order
•Each list is a subsequence of the previous one, i.e.,
                                            S0 ⊇ S1 ⊇ … ⊇ Sh
•List Sh contains only the two special keys

 Q5 How we can generate a maze with the help of union
 Answer:- (Page 424)
How can we generate maze? The algorithm is as follows:
    Randomly remove walls until the entrance and exit cells are in the same set.
    Removal of the wall is the same as doing a union operation.
    Do not remove a randomly chosen wall if the cells it separates are already I the same set.

 Q7 Following is an array with exactly 15 elements:
 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15.
 Suppose that we are doing a binary search for an element. Indicate any elements that will be found by
 examining two or fewer numbers from the array. 5
Answer:- Repeat

                                     FINALTERM EXAMINATION 2010

( Marks: 10 )
Write down the C++ code to implement insertion sort algorithm.
Answer:- (Page 483)
Following is the code of the insertion sort in C++.
void insertionSort(int *arr, int N)
{
int pos, count, val;
for(count=1; count < N; count++)
{
val = arr[count];
for(pos=count-1; pos >= 0; pos--)
if (arr[pos] > val)
arr[pos+1]=arr[pos];
else break;
arr[pos+1] = val;

}
}

Q2. What is Table ADT? Discuss any two implementations of table ADT. ( Marks: 5)
Answer:- (Page 427, 428)
The table, an abstract data type, is a collection of rows and columns of information.
Implementation of Table
o Unsorted Sequential Array
o Sorted Sequential Array

Question No: 3
Suppose we have the following representation for a complete Binary Search Tree, tell the Left and Right
child nodes and Parent node of the node D                ( Marks: 5)

        A   B   C   D   E   F   G   H   I   J    K    L   M    N    O   P    Q   R    S    T    …
    0   1   2   3   4   5   6   7   8   9   10 11 12 13 14 15 16 17 18 19 20 …

Answer:-
parent: B using formula(i/2)
left child:-H 2i=2*4=8=H
Right child:-I 2i+1=8+1=9=I

Question No: 4
.Consider the following max heap. Add node 24 in it and show the resultant Heap. ( Marks: 3 )

 Answer:-

                                                          127

                                      24                                      25

                         20                                        7                         3
                                              13

            2

Question No: 5 ( Marks: 3 )

More CS301 files

All CS301 files · Midterm Prep 2026 · MCQs Bank