CS301 MIDTERM SUBJECTIVE SOLVED WITH REFRENCES BY MOAAZ.pdf
Verified academic study resource for CS301 (Data Structures) under the Computer Science at Virtual University of Pakistan. This PDF document (Midterm Solved Past Paper & Revision File compiled by Moaaz Siddhu) covers Mid-Term Exam Scope (Lectures 1 to 22) spanning approximately 240 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
- Type
- Midterm
- Coverage
- Mid-Term Exam Scope (Lectures 1 to 22)
- Compiled by
- Moaaz Siddhu
- Tags
- SUBJECTIVE, SOLVED, MIDTERM
Focus on core definitions and repeated MCQs from Lectures 1–22. Remember that scoring in the First Half builds your safety buffer toward the mandatory 20% Two-Half passing rule in CS301.
What this file covers — CS301 syllabus roadmap
- Core Architecture, Syntax & Primitive Data Structures — Lectures 1 to 6 (Pages 1 to 65). 15% Objective Marks (8–10 MCQs)
- Conditional Branching, Loops & Logical Control Flow — Lectures 7 to 12 (Pages 66 to 140). 18% Exam Marks (MCQs + 2-Mark Short Questions)
- Memory Management, Pointers, Arrays & Functions — Lectures 13 to 18 (Pages 141 to 215). 22% Exam Marks (High Yield for Midterms)
- Midterm Consolidation, Strings & Algorithm Synthesis — Lectures 19 to 22 (Pages 216 to 280). Midterm Exam Culmination (Lectures 1–22 Scope)
Frequently asked questions
Where can I download CS301 MIDTERM SUBJECTIVE SOLVED WITH REFRENCES BY MOAAZ.pdf for free?
You can preview and download "CS301 MIDTERM SUBJECTIVE SOLVED WITH REFRENCES BY MOAAZ.pdf" (CS301 PDF, ~240 pages) directly from the MIHORA VU Study Library (https://study.mihora.tech/doc/cs301-midterm-subjective-solved-with-refrences-by-moaaz-pdf-2) with 100% free high-speed downloads and zero registration requirements.
What syllabus chapters and lectures are covered in this CS301 file?
This document covers Mid-Term Exam Scope (Lectures 1 to 22) across 4 distinct lecture units (Lectures 1 to 6, Lectures 7 to 12, Lectures 13 to 18, Lectures 19 to 22), 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 DEC 09,2011
FROM MIDTERM PAPERS
MC100401285 Moaaz.pk@gmail.com Mc100401285@gmail.com PSMD01
MC110200030 awais4you@gmail.com PLHR25
1
Cs301- current midterm paper-1(NOV 2011)
Q:1 What is complete binary tree?
Answer:
"A complete binary tree is a binary tree with the additional property that every node must have exactly two
children if an internal node, and zero children if a leaf node."
Q:2 How single left rotation is performed in AVL tree?
Answer:
This rotation is almost similar to the single right rotation. We start from tree node k1. k1 is the root whilet ree
node k2 is its right child. Due to the left rotation, the right child k2 of the root k1 will become the root. The k1
will go down to the left child of k2.
Q:3 describe the following
(i) Height of tree
(ii) Balance of Node
(i) Height of tree
Answer: (Page 209)
The height of a binary tree is the maximum level of its leaves (also called the depth).
(ii) Balance of Node
Answer: (page 215)
The balance of a node in a binary search tree is defined as the height of its left subtree minus height of its right
subtree. In other words, at a particular node, the difference in heights of its left and right subtree gives the
balance of the node.
Cs301- current midterm paper-2(NOV 2011)
Q1 what is binary tree brief it?
Answer:-
“A binary tree is a finite set of elements that is either empty or is partitioned into three disjoint subsets. The first
subset contains a single element called the root of the tree. The other two subsets are themselves binary trees
called the left and right sub-trees”.
Q2.what is different between binary tree and AVL tree
Answer:- (Page 212)
An AVL tree is identical to a BST, barring the following possible differences:
Height of the left and right subtrees may differ by at most 1.
Height of an empty tree is defined to be (–1).
Why queue is linear data structure.
Answer:-(Page 87)
A queue is a linear data structure into which items can only be inserted at one end and removed from the other.
2
In contrast to the stack, which is a LIFO (Last In First Out) structure, a queue is a FIFO (First In First Out)
structure.
How we can delete a node with two Childs in a binary search tree using its right sub tree.
Answer:- Page 263
The node to be deleted has either left child (subtree) or right child (subtree).In this case we bypass the node in
such a way that we find the inorder successor of this node and then link the parent of the node to be deleted to
this successor node. Thus the node was deleted.
define const keyword, reference variable, Dangling reference
Answer: (Page 198)
Const keyword
The const keyword is used for something to be constant. The actual meanings depend on where it occurs but it
generally means something is to held constant. There can be constant functions, constant variables or parameters
etc.
Reference variable
The references are pointers internally, actually they are constant pointers. You cannot perform any kind of
arithmetic manipulation with references that you normally do with pointers.
Dangling reference
The pointer of the object (when object has already been deallocated or released) is called dangling pointer.
Cs301- current midterm paper-3(NOV 2011)
Q: 1 what is complete binary tree?
Answer: (Page 123)
The definition of the complete binary tree is
A complete binary tree of depth d is the strictly binary tree all of whose leaves are level d.
Q: 2 how single left rotation is performed in AVL tree?
Answer: rep
Q:3 describe the following
(i) Height of tree
(ii) Balance of Node
Answer: rep
Cs301- current midterm paper-4(NOV 2011)
Q1 what is binary tree breif it?
Answer:- rep
Q2.what is different between binary tree and AVL tree
Answer: rep
Why queue is linear data structure.
Answer: rep
3
MIDTERM EXAMINATION 2011 (MAY)
1. What is function of length () method in the Queue
Answer: (page 111)
In Queue length() method, has a single statement i.e.
return size ;
This method returns the size of the queue, reflecting the number of elements in the queue. It is not the size of
the array used internally to store the elements of the queue.
2. Explain the two cases in which we apply double rotation in An Avl tree
Answer: (Page 229)
Sometimes a single rotation is not sufficient to balance an unbalanced tree.
The two cases are following:
1. Insertion into the right subtree of the left child of X node (RL)
2. Insertion into the left subtree of the right child of X node (LR)
3. How can we perform level-order traversal on a tree?
Answer:- (For More detail and code see Page 161 )
We can print a binary tree level by level by employing recursive or non-recursive method.
The idea of a level-order traversal is to visit the root, then visit all nodes "1 level away" (depth 2) from the root
(left to right), then all nodes "2 levels away" (depth 3) from the root, etc. For the example tree, the goal is to
visit the nodes in the following order:
A level-order traversal requires using a queue (rather than a recursive algorithm, which implicitly uses a stack).
A queue is a FIFO structure, which can make the level-order traversal easier.
4. How can the dangling reference problem be avoided?
Answer:- ( Page 200 )
To avoid dangling reference, don’t return the reference of a local variable (transient) from a function.
MIDTERM EXAMINATION 2011 (MAY)
Q:1 What is complete binary tree?
Answer: rep
Q:2 How single left rotation is performed in AVL tree?
Answer: rep
What is binary tree breif it?More CS301 files
- CS301 - Midterm Paper 2 by Waqar Solved by Hadi.pdf (PDF · Midterm)
- CS301 - Midterm Paper 3 by Waqar Solved by Hadi.pdf (PDF · Midterm)
- CS301 Current Midterm 2022 Papers.pdf (PDF · Midterm)
- CS301 Grand Quiz file for Mid Term Prepratin by VU Stars.pdf (PDF · Midterm)
- CS301 Grand Quiz file for Mid Term Prepratin by VU Stars.pdf (PDF · Midterm)
- CS301 MIDTERM FILE 1 SOLVED BY TEAM HADI.pdf (PDF · Midterm)
- CS301 MIDTERM FILE 3 SOLVED BY TEAM HADI.pdf (PDF · Midterm)
- CS301 MIDTERM FILE 4 SOLVED BY TEAM HADI.pdf (PDF · Midterm)