cs301AdminREHMAN.docx

Verified academic study resource for CS301 (Data Structures) under the Computer Science at Virtual University of Pakistan. This DOC document (Verified Study Resource) covers Full Course Curriculum spanning approximately 280 pages across 8 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
DOC
Type
Study Resource
Coverage
Full Course Curriculum

Review this document alongside the official handouts and test your retention in the Interactive MCQs Studio.

What this file covers — CS301 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 cs301AdminREHMAN.docx for free?

You can preview and download "cs301AdminREHMAN.docx" (CS301 DOC, ~280 pages) directly from the MIHORA VU Study Library (https://study.mihora.tech/doc/cs301adminrehman-docx) with 100% free high-speed downloads and zero registration requirements.

What syllabus chapters and lectures are covered in this CS301 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 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


AdminRehman
Shortnotes
Data Structures (CS301)
Introduction

Data structures:

I
    1. Arrays

An array is a structure of fixed-size, which can hold items of the same data type. It can be an array of integers, an array of floating-point numbers, an array of strings or even an array of arrays (such as 2-dimensional arrays). Arrays are indexed: meaning that random access is possible.
Array operations

    • • Traverse: Go through the elements and print them.
    • • Search:  You can search the element by its value or its index
    • • Update: Update the value of an existing element at a given index

Inserting elements to an array and deleting elements from an array cannot be done straight away as arrays are fixed in size. If you want to insert an element to an array, first you will have to create a new array with increased size (current size + 1), copy the existing elements and add the new element. The same goes for the deletion with a new array of reduced size

Applications of arrays

    • • Used as the building blocks to build other data structures such as array lists, heaps, hash tables, vectors and matrices.

    • Used for different sorting algorithms such as insertion sort, quick sort, bubble sort and merge sort.
    •
    2. Linked Lists

A linked list is a sequential structure that consists of a sequence of items in linear order which are linked to each other. Hence, you have to access data sequentially and random access is not possible. Linked lists provide a simple and flexible representation of dynamic sets.

    • • Elements in a linked list are known as nodes.
    • • Each node contains a key and a pointer to its successor node, known as next.
    • • The attribute named head points to the first element of the linked list.
    • • The last element of the linked list is known as the tail.

Following are the various types of linked lists available.

    • • Singly linked list — Traversal of items can be done in the forward direction only.
    • • Doubly linked list — Traversal of items can be done in both forward and backward directions. Nodes consist of an additional pointer known as prev, pointing to the previous node.
    • • Circular linked lists — Linked lists where the prev pointer of the head points to the tail and the next pointer of the tail points to the head.

Linked list operations

    • • Search: Find the first element with the key k in the given linked list by a simple linear search and returns a pointer to this element

    • Insert: Insert a key to the linked list. An insertion can be done in 3 different ways; insert at the beginning of the list, insert at the end of the list and insert in the middle of the list.
    • • Delete: Removes an element x from a given linked list. You cannot delete a node by a single step. A deletion can be done in 3 different ways; delete from the beginning of the list, delete from the end of the list and delete from the middle of the list.
    •
Applications of linked lists

    • • Used for symbol table management in compiler design.
    • • Used in switching between programs using Alt + Tab (implemented using Circular Linked List).

    3. Stacks

A stack is a LIFO (Last In First Out — the element placed at last can be accessed at first) structure which can be commonly found in many programming languages. This structure is named as “stack”

Stack operations

Given below are the 2 basic operations that can be performed on a stack.

    • • Push: Insert an element on to the top of the stack.
    • • Pop: Delete the topmost element and return it

    • Peek: Return the top element of the stack without deleting it.
    • • isEmpty: Check if the stack is empty.
    • • isFull: Check if the stack is full.

Applications of stacks

    • • Used for expression evaluation (e.g.: shunting-yard algorithm for parsing and evaluating mathematical expressions).
    • • Used to implement function calls in recursion programming.

    4. Queues

A queue is a FIFO (First In First Out — the element placed at first can be accessed at first) structure which can be commonly found in many programming languages. This structure is named as “queue” because it resembles a real-world queue — people waiting in a queue.

Queue operations

Given below are the 2 basic operations that can be performed on a queue.
.
    • • Enqueue: Insert an element to the end of the queue.
    • • Dequeue: Delete the element from the beginning of the queue.

Applications of queues

    • • Used to manage threads in multithreading.

    • Used to implement queuing systems

    5. Hash Tables

A Hash Table is a data structure that stores values which have keys associated with each of them.
Hence it is very efficient in inserting and searching, irrespective of the size of the data.
Direct Addressing

 uses the one-to-one mapping between the values and keys when storing in a table. However, there is a problem with this approach when there is a large number of key-value pairs.
 To avoid this issue we use hash tables.

Hash Function

A special function named as the hash function (h) is used to overcome the aforementioned problem in direct addressing.
In direct accessing, a value with key k is stored in the slot k. Using the hash function, we calculate the index of the table (slot) The value calculated using the hash function for a given key is called the hash value which indicates the index of the table to which the value is mapped.
h(k) = k % m

    • • h: Hash function
    • • k: Key of which the hash value should be determined
    • • m: Size of the hash table (number of slots available). A prime value that is not close to an exact power of 2 is a good choice for m

Applications of hash tables

    • • Used to implement database indexes.
    • • Used to implement associative arrays.
    • • Used to implement the “set” data structure.

    6. Trees

More CS301 files

All CS301 files · Midterm Prep 2026 · MCQs Bank