CS301 Short Notes for Midterm Exams 2021 (Study with BRD).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) 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)
- Tags
- 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 Short Notes for Midterm Exams 2021 (Study with BRD).pdf for free?
You can preview and download "CS301 Short Notes for Midterm Exams 2021 (Study with BRD).pdf" (CS301 PDF, ~240 pages) directly from the MIHORA VU Study Library (https://study.mihora.tech/doc/cs301-short-notes-for-midterm-exams-2021-study-with-brd-pdf) 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- Short Notes for Midterm Exams 2021
www.VUAnswer.com
Linked List
1. LInked List
Low-level data structure
Represent a sequence of nodes that have pointers to other nodes.
2. 3 basic kinds of linked list
Singly Linked List
Doubly Linked List
Circular Linked List
3. Head
No matter how many nodes are present in the linked list, the very first node is
called head
4. Tail
The last node is called the tail. If there is just one node created then it is called both
head and tail.
5. Singly Linked List
In this list, the nodes each have one pointer to the next node
6. doubly-linked list
In a doubly-linked list contains some data, a link to the next node and a link to the
previous node.
7. A node in Singly Linked List contains what?
Value
Next Pointer
8. In a linked list
The first node is ... ?
The last node is ... ?
The first node is Head
The last node is Tail
9. How do we keep the connection to a linked list?
By a variable pointing to the head
10. Simple Pseudo code of Singly LinkedListNode
public class LinkedListNode {
public int value;
public LinkedListNode next;
public LinkedListNode(int value) {
this.value = value;
}
}
We could build a singly linked list like this:
LinkedListNode a = new LinkedListNode(5);
LinkedListNode b = new LinkedListNode(1);
LinkedListNode c = new LinkedListNode(9);
a.next = b;
b.next = c;
11. Simple Pseudo code of Doubly LinkedListNode
public class LinkedListNode {
public int value;
public LinkedListNode next;
public LinkedListNode previous;
public LinkedListNode(int value) {
this.value = value;
}
}
So we could build a doubly linked list like this:
LinkedListNode a = new LinkedListNode(5);
LinkedListNode b = new LinkedListNode(1);
LinkedListNode c = new LinkedListNode(9);
// put b after a
a.next = b;
b.previous = a;
// put c after b
b.next = c;
c.previous = b;
12. Time Complexity for Insert /remove from the front
Constant
13. Constant Time to insert/remove from the back is when?
Tail and Doubly LInked List
14. Constant Time to insert between node when?
Doubly Linked List
ADT and Stack
1. Abstraction
Representation of an entity with only it's most relevant attributes.
2. Encapsulation
Having modules whose state is accessed through its methods only.
3. Implementation
Code written in methods
4. Data Hiding
Decoupling implementation from interface.
-Make all fields private except methods that others will use ( hide state and make
interface available)
Advantage : Low Coupling (Implementation can change without affecting others)
5. Encapsulation
Modularity + Data Hiding
6. Modularity
Keep implementation and state in one module (class)
Advantage: High Cohesion (Everything associated with the call is together)
7. Abstract Data Types (ADT)
a data type with values and operations that are not defined in the language by
default.
8. Data Structure
A programming construct used to implement ADTs.
-Mechanism for organizing the data that is the ADT is encapsulating
-Data structures should be hidden by the API(methods) of the ADT
9. Stack
A Stack is a Last In First Out (LIFO) data structure. It supports two basic operations
called push and pop. The push operation adds an element at the top of the stack,
and the pop operation removes an element from the top of the stack.
The Stack class extends Vector which implements the List interface.
Queues
1. What is a queue?
An ADT with FIFO characteristics
2. What does FIFO stand for?
First In First Out
3. Where does insertion occur in a queue
The rear
4. What are some other words that are used for the queue insertion operation?
Put, Add, or Enqueue
5. What are other names for the remove operation in a queue?
Get, Delete, or Dequeue
6. Where does removal occur?
At the front of the queue
7. Explain the procedure for insertion in a queue
If the rear has reached the end of the array, set it equal to -1 2) Increment rear, and
set the value of rear equal to the item being inserted 3) Increment the number of
items in the queue
8. Explain the procedure for removing an item from a queue
Retrieve the current value at the front of the queue into a temporary variable
Increment the value of the front 3) If front is now equal to maxsize, set front equal to
0 4) Decrement the number of items in the queue 5) Return the temporary value
9. Explain how to determine if a queue is empty without using an item counter
By checking that the rear + 1 is equal to the front or that the front + maxsize - 1 is
equal to the rear
10. Explain how to tell if a queue is full without using a counter
If the rear + 2 is equal to the front, or if the front + maxsize - 2 is equal to the rear.
Binary Tree
1. Binary tree
a structure with a unique starting node, in which each node is capable of having two
child nodes, and in which a unique path exist from the root to every other node
2. Root
the top node of a tree structure; a node with no parent
3. Leaf node
a tree node that has no children
4. Level
the distance of a node from the root; the root is level 0
5. Height
the maximum level
6. Binary search tree
A binary tree in which the key value in any node is greater than the key value in its
left child and any of its children and less than the key value in its right child in any of
its children
7. keysMore 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)