Data Structures in C++ PDF Download – Aikman Series BSCS

BSCS students can download the complete Aikman Series textbook “Data Structures in C++” as a free PDF. Written by C M Aslam (M.Sc. Computer Science, M.Sc. Punjab University) and published by Aikman Book Corporation, Lahore, this book covers all the fundamental data structures taught in Pakistani universities using the C++ programming language.

The book is written in simple, easy-to-follow language with small, practical C++ programs alongside every algorithm. It is suitable for self-study, classroom use, and exam preparation for BSCS students, and all programs are compatible with Turbo C++ and Borland C++.

Book Overview

LevelUniversity / BSCS
SubjectData Structures in C++
SeriesAikman Series
AuthorC M Aslam (M.Sc. Comp. Sc., M.Sc. PU)
PublisherAikman Book Corporation, Urdu Bazar, Lahore
Total Chapters9
Total Pages241
FormatPDF

Chapter List

Chapter 1: Introduction

Explains the difference between data and information, key terms like entity, field, record, and file, and defines a data structure as a user-defined type built from basic data types. Covers linear (arrays, linked lists, stacks, queues) versus non-linear (trees, graphs) data structures, core operations (inserting, deleting, searching, traversing, sorting), and how algorithms are written using comments, selection statements, loops, and sub-algorithms.

Important Questions:

  • What is the difference between data and information? Answer: Data is raw facts and values, while information is processed data that carries useful meaning.
  • Give two examples each of linear and non-linear data structures. Answer: Arrays and linked lists are linear; trees and graphs are non-linear.
  • What are the basic operations performed on data structures? Answer: Inserting, deleting, searching, traversing, sorting, and merging.
  • What is an algorithm? Answer: A step-by-step procedure for solving a problem, written before the actual program code.

Chapter 2: Arrays

Defines an array as an ordered collection of same-type elements accessed by index, and explains lower bound, upper bound, and size (UB − LB + 1). Covers how arrays occupy a contiguous memory block with a base address, and the main array operations: traversing, inserting (at the end or at a specified location), deleting, plus two-dimensional arrays and matrix operations.

Important Questions:

  • How is the size of a one-dimensional array calculated? Answer: Size = Upper Bound (UB) minus Lower Bound (LB), plus 1.
  • What is the base address of an array? Answer: The memory address of the array’s first element, used to calculate the address of any other element.
  • What is the index of the first element of an array in C++? Answer: 0.
  • Name the two ways items can be inserted into an array. Answer: Inserting at the end of the array and inserting at a specified location.

Chapter 3: Strings

Defines a string as a sequence of characters ending with a null character (‘’) in C++, and explains the three storage types: fixed-length strings, variable-length strings (using boundary markers or string descriptors), and linked strings. Covers core string operations with algorithms: computing length, copying, concatenation, extracting a substring, pattern matching, insertion, deletion, and replacement.

Important Questions:

  • What character marks the end of a string in C++? Answer: The null character ‘’.
  • What are the three types of string storage? Answer: Fixed-length strings, variable-length strings, and linked strings.
  • What does pattern matching do? Answer: It finds whether and where a smaller string (the pattern) occurs within a larger string.
  • What is string concatenation? Answer: Joining two strings together to form one combined string.

Chapter 4: Stacks

Defines a stack as a LIFO (Last In First Out) structure, using the spring-loaded dish rack as an everyday example, where insertion (Push) and deletion (Pop) happen only at the top. Covers overflow and underflow checks, recursion and its implementation using stacks, and expression evaluation using Polish (prefix) and Reverse Polish (postfix) notation, including infix-to-postfix conversion.

Important Questions:

  • What does LIFO mean? Answer: Last In, First Out — the last item added to the stack is the first one removed.
  • What is the difference between Push and Pop? Answer: Push adds an item to the top of the stack; Pop removes the item from the top.
  • What condition occurs when inserting into a full stack? Answer: Stack overflow.
  • What is Reverse Polish Notation also known as? Answer: Postfix notation.

Chapter 5: Queues

Defines a queue as a FIFO (First In First Out) structure, like a line of people, where items are inserted at the rear and removed from the front. Covers the array representation of a queue using Front and Rear pointers, the QINSERT and QDEL procedures, and two special types: deques (double-ended queues) that allow insertion and deletion at both ends, and priority queues, where items are removed based on priority.

Important Questions:

  • What does FIFO stand for? Answer: First In, First Out.
  • At which end of a queue are new items inserted? Answer: The rear (back) end.
  • What is a deque? Answer: A double-ended queue that allows insertion and deletion at both the front and the rear.
  • How does a priority queue differ from a regular queue? Answer: Items are removed based on priority rather than strictly the order they were inserted.

Chapter 6: Searching & Sorting

Explains searching as the process of finding a specific data item, covering sequential search (checking elements one by one) and binary search (used on sorted data by repeatedly halving the search range). Covers four sorting techniques with algorithms and C++ programs: bubble sort, selection sort, insertion sort, and merge sort.

Important Questions:

  • What is required before binary search can be used? Answer: The array must already be sorted.
  • Which search method checks elements one by one from start to end? Answer: Sequential search.
  • Name the four sorting techniques covered in this chapter. Answer: Bubble sort, selection sort, insertion sort, and merge sort.
  • Why is sequential search not recommended for large data sets? Answer: Because it is a slow process compared to methods like binary search.

Chapter 7: Linked Lists

Introduces linked lists as a dynamic alternative to arrays, using pointers to link nodes stored anywhere in memory instead of a contiguous block. Covers single linked lists (traversing, insertion at the beginning, end, or a specified location, and deletion), circular linked lists, and double linked lists (two-way lists) along with circular double-linked lists.

Important Questions:

  • What does a node in a linked list consist of? Answer: A data field and a pointer (link) field pointing to the next node.
  • Why are linked lists useful compared to arrays? Answer: Their size can change dynamically during program execution, unlike a static array.
  • What value does the last node’s pointer field hold in a single linked list? Answer: NULL.
  • How does a double linked list differ from a single linked list? Answer: It has pointers to both the next and previous nodes, allowing traversal in both directions.

Chapter 8: Trees

Defines a tree as a non-linear, hierarchical data structure with a root node, parent-child relationships, and terminal (leaf) nodes, then focuses on binary trees where each node has at most two children. Covers binary search trees (BST) — construction, insertion, searching, and deletion — along with the three traversal methods (preorder, inorder, postorder) and expression binary trees.

Important Questions:

  • What is the maximum number of children a node can have in a binary tree? Answer: Two.
  • What is a leaf node? Answer: A node with no children, also called a terminal node.
  • Name the three binary tree traversal methods. Answer: Preorder, inorder, and postorder traversal.
  • What is a binary search tree (BST)? Answer: A binary tree where left child values are smaller and right child values are larger than the parent node, making searching efficient.

Chapter 9: Graphs

Introduces graphs as non-linear structures made of vertices (nodes) and edges, used to represent many-to-many relationships like transportation or communication networks. Covers undirected, directed, and weighted graphs, key terms such as degree, in-degree/out-degree, source and sink nodes, and paths, plus two ways to represent a graph in memory (adjacency matrix and adjacency list) and two traversal methods: Breadth-First Search (BFS) and Depth-First Search (DFS).

Important Questions:

  • What is the difference between a directed and an undirected graph? Answer: A directed graph’s edges have direction (one-way); an undirected graph’s edges have no direction.
  • What is a weighted graph? Answer: A graph in which each edge has an associated weight or cost, often representing distance.
  • Name the two common ways to represent a graph in memory. Answer: Adjacency matrix and adjacency list.
  • What is the difference between BFS and DFS? Answer: BFS explores neighboring nodes level by level, while DFS explores as far as possible along one branch before backtracking.

Download Data Structures in C++ PDF

Your free PDF is ready. Click the button below to download the complete Aikman Series Data Structures textbook.

⬇ Download PDF

Who Should Read This

This book is written for BSCS students studying Data Structures at Pakistani universities. BIT, BSIT, and MCS students who have Data Structures in their curriculum will also find it useful. The clear explanations and practical C++ programs make it ideal for both self-study and exam preparation.


Applicable Universities

This Aikman Series textbook is widely used at Pakistani universities offering BSCS, BIT, BSIT, and MCS programs, including Punjab University, Virtual University, COMSATS, FAST, UET, and other HEC-recognized institutions.

FAQs

Is this the Aikman Series Data Structures book for BSCS?

Yes, this is the Aikman Series Data Structures in C++ textbook by C M Aslam, widely used in BSCS programs at Pakistani universities.

Which data structures are covered in this book?

The book covers Arrays, Strings, Stacks, Queues, Searching and Sorting, Linked Lists (single, double, circular), Trees (binary, BST), and Graphs — all 9 chapters with C++ implementation.

Does this book include C++ programs?

Yes, practical C++ programs are included throughout all chapters. All programs are compatible with Turbo C++ and Borland C++.

Is searching and sorting covered in detail?

Yes, Chapter 6 covers sequential search, binary search, bubble sort, selection sort, insertion sort, and merge sort with C++ code.

Does it include important questions for exam preparation?

Yes, each chapter includes a summary along with important questions and answers to help with revision.

Can BIT or BSIT students also use this book?

Yes, BIT, BSIT, and MCS students with Data Structures in their syllabus will find this book useful for both theory and practical exam preparation.

Related Books

2 thoughts on “Data Structures in C++ PDF Download – Aikman Series BSCS”

  1. Assalamualaikum Sir.
    I like your books too much but unfortunately I searched multiple places but I didn’t find. Sir how may I get your books.
    Thank you.

    Reply

Leave a Comment