Data Structures Course Overview for B.Tech
Data Structures Course Overview for B.Tech
COURSE FILE
CONTENTS
[Link] Particulars Page No
1 Course Details 2
2 Course Introduction 3
3 Course Objectives 4
4 Course Outcomes 4
6 Syllabus 5
8 Session Plan 7
12 Assignments 26
13 Seminars 28
1
Aurora’s Scientific and Technological Institute
1. Course Details:
1 Course Code CS302PC
2 Course Title Data Structures
3 Course Abbreviation DS
4 Credits 3 (L:3-T:0-P:0)
5 Regulation R22
6 Academic Year 2025-26
7 Programme [Link]
8 Specialisation Computer Science and Engineering
9 Year – Semester II Year – I Semester
10 Course File Prepared by [Link] Kumar, Associate Professor, Department of CSE
2
Aurora’s Scientific and Technological Institute
2. Course Introduction
The course Data Structures is designed to provide students with a comprehensive understanding of how
data can be organized, managed, and processed efficiently in computer memory. It builds upon the
foundational programming concepts learned in Programming for Problem Solving and introduces the
essential principles and techniques for designing efficient algorithms and data management solutions.
Students begin by exploring the concept of abstract data types (ADTs) and learning how different data
structures—such as lists, stacks, and queues—support efficient data manipulation and retrieval. They
study the underlying representations of these structures using arrays and linked lists, along with various
operations like insertion, deletion, and searching.
The course then advances to dictionaries and hashing techniques, which enable rapid data access and
storage. Students learn different hashing strategies and collision resolution mechanisms, such as linear
probing, chaining, and double hashing, which are fundamental to the implementation of efficient search
systems.
In subsequent units, the course delves into tree and graph data structures, which form the backbone of
many modern computing applications. Students study binary search trees, AVL trees, B-trees, and red-
black trees to understand how hierarchical data is maintained, balanced, and traversed efficiently. The
module on graphs introduces representation methods and traversal algorithms, enabling learners to model
and solve real-world problems such as network routing and dependency analysis.
Additionally, the course covers sorting algorithms like quick sort, heap sort, and merge sort, focusing on
both internal and external sorting techniques to handle large datasets. The final unit introduces pattern
matching and trie structures, emphasizing efficient text processing, searching, and data compression
techniques used in applications such as compilers, search engines, and bioinformatics.
Through a combination of theoretical concepts and practical implementation, students gain hands-on
experience in designing and implementing data structures using the C programming language. The
practical sessions reinforce analytical thinking, problem-solving, and coding proficiency.
Aligned with the Outcome-Based Education (OBE) framework, this course forms a crucial bridge
between basic programming and advanced topics such as Algorithms, Database Systems, and Software
Engineering. By mastering data structures, students develop the foundation required to design scalable,
optimized, and maintainable software solutions.
Key Highlights:
Builds strong conceptual and practical understanding of linear and non-linear data structures.
Emphasizes efficiency, optimization, and algorithmic design principles.
Integrates hands-on programming exercises for each data structure.
Strengthens the ability to select appropriate data structures for given problems.
Prepares students for advanced courses in Algorithms, Database Systems, and Software Design.
3
Aurora’s Scientific and Technological Institute
3. Course Objectives:
1. Exploring basic data structures such as stacks and queues.
2. Introduces a variety of data structures such as hash tables, search trees, tries, heaps, graphs.
3. Introduces sorting and pattern matching algorithms.
4
Aurora’s Scientific and Technological Institute
Blooms Taxonomy:
Cognitive Skill Key Action Verbs
Leve Typical
Category (Student Learning (for Questions / COs /
l Question Type
Outcome) Assignments)
Recall previously learned Define, List, Name, State,
Objective /
L1 Remember facts, Identify, Label, Recall,
MCQs
terms, and basic concepts. Match
Explain, Describe, Discuss,
Explain ideas or concepts;
Summarize, Interpret, Short Answer /
L2 Understand interpret and summarize
Classify, Conceptual
information.
Distinguish
Program
Use learned knowledge in Apply, Use, Demonstrate,
Writing /
L3 Apply new Compute, Execute,
Application
situations to solve problems. Implement
Problems
Break down information into
Analyze, Compare, Contrast, Analytical
components; examine
L4 Analyze Differentiate, Examine, Questions /
patterns, relationships, or
Categorize, Organize Algorithm Design
causes.
Design
Make judgments based on Evaluate, Justify, Test,
Evaluation /
L5 Evaluate criteria; verify and justify Critique, Validate, Conclude,
Debugging /
solutions. Recommend
Validation
Generate new ideas, combine
Create, Design, Develop, Project / Case
elements, or design
L6 Create Construct, Formulate, Plan, Study / Open
innovative
Generate ended Problem
solutions.
5
Aurora’s Scientific and Technological Institute
6
Aurora’s Scientific and Technological Institute
6. Syllabus:
Unit Topics Hours
Introduction to Data Structures: Abstract data types, Linear list – singly linked list
implementation, insertion, deletion and searching operations on linear list,
I 12
Stacks: Operations, array and linked representations of stacks, stack applications,
Queues: Operations, array and linked representations.
Dictionaries: linear list representation, skip list representation, operations - insertion,
deletion and searching.
II Hash Table Representation: hash functions, collision resolution-separate chaining, 8
open addressing, linear probing, quadratic probing, double hashing, rehashing,
extendible hashing.
Search Trees: Binary Search Trees, Definition, Implementation, Operations-
Searching, Insertion and Deletion, B- Trees, B+ Trees, AVL Trees, Definition, Height
III 7
of an AVL Tree, Operations – Insertion, Deletion and Searching, Red –Black, Splay
Trees.
Graphs: Graph Implementation Methods. Graph Traversal Methods.
IV Sorting: Quick Sort, Heap Sort, External Sorting- Model for external sorting, Merge 8
Sort.
Pattern Matching and Tries: Pattern matching algorithms-Brute force, the Boyer –
V Moore algorithm, the Knuth-Morris-Pratt algorithm, Standard Tries, Compressed Tries, 10
Suffix tries.
Total Hours: 45
7
Aurora’s Scientific and Technological Institute
7.2. References:
1. Data Structures: A Pseudocode Approach with C, 2 nd Edition, R. F. Gilberg and [Link],
Cengage Learning.
8
Aurora’s Scientific and Technological Institute
8. Session Plan:
Reference
[Link]. Unit Topic / Sub-Topic Teaching Methodology
(Books)
Introduction to Data Structures and
1 I Lecture + PPT + Example Programs TB1, Ch.1
Abstract Data Types
Linear Lists and Singly Linked List
2 I Lecture + PPT + Example Programs TB1, Ch.2
Concepts
3 I Linked List Insertion Operations Lecture + PPT + Example Programs TB1, Ch.3
4 I Linked List Deletion Operations Lecture + PPT + Example Programs TB1, Ch.4
5 I Linked List Searching Operations Lecture + PPT + Example Programs TB1, Ch.5
6 I Stacks - Definition and Operations Lecture + PPT + Example Programs TB1, Ch.6
7 I Stack Implementation using Arrays Lecture + PPT + Example Programs TB1, Ch.7
Stack Implementation using Linked
8 I Lecture + PPT + Example Programs TB1, Ch.8
Lists
9 I Applications of Stacks Lecture + PPT + Example Programs TB1, Ch.9
10 I Queues - Definition and Operations Lecture + PPT + Example Programs TB1, Ch.10
11 I Queue Implementation using Arrays Lecture + PPT + Example Programs TB1, Ch.11
Queue Implementation using Linked
12 I Lecture + PPT + Example Programs TB1, Ch.12
Lists
Dictionaries and Linear List
13 II Lecture + PPT + Example Programs TB1, Ch.1
Representation
14 II Skip List Representation and Operations Lecture + PPT + Example Programs TB1, Ch.2
16 II Collision Resolution - Separate Chaining Lecture + PPT + Example Programs TB1, Ch.4
17 II Open Addressing - Linear Probing Lecture + PPT + Example Programs TB1, Ch.5
18 II Quadratic Probing and Double Hashing Lecture + PPT + Example Programs TB1, Ch.6
19 II Rehashing Techniques Lecture + PPT + Example Programs TB1, Ch.7
20 II Extendible Hashing Lecture + PPT + Example Programs TB1, Ch.8
21 III Binary Search Trees and Operations Lecture + PPT + Example Programs TB2, Ch.1
22 III B-Trees - Definition and Structure Lecture + PPT + Example Programs TB2, Ch.2
23 III B+ Trees - Structure and Applications Lecture + PPT + Example Programs TB2, Ch.3
24 III AVL Trees - Definition and Height Lecture + PPT + Example Programs TB2, Ch.4
25 III AVL Tree Operations - Insertion Lecture + PPT + Example Programs TB2, Ch.5
26 III Red-Black and Splay Trees Concepts Lecture + PPT + Example Programs TB2, Ch.6
27 III Deletion and Searching in Trees Lecture + PPT + Example Programs TB2, Ch.7
28 IV Graph Definitions and Representations Lecture + PPT + Example Programs TB2, Ch.1
29 IV Graph Implementation Techniques Lecture + PPT + Example Programs TB2, Ch.2
30 IV Graph Traversal - BFS and DFS Lecture + PPT + Example Programs TB2, Ch.3
31 IV Applications of Graphs Lecture + PPT + Example Programs TB2, Ch.4
32 IV Sorting - Quick Sort Lecture + PPT + Example Programs TB2, Ch.5
9
Aurora’s Scientific and Technological Institute
TB1 – Fundamentals of Data Structures in C, 2nd Edition, E. Horowitz, S. Sahni, Susan Anderson Freed,
Universities Press.
TB2 – Data Structures using C, A. S. Tanenbaum, Y. Langsam, M. J. Augenstein, PHI/Pearson Education.
RB1 – Data Structures: A Pseudocode Approach with C, 2nd Edition, R. F. Gilberg, B. A. Forouzan,
Cengage Learning.
10
Aurora’s Scientific and Technological Institute
11
Aurora’s Scientific and Technological Institute
The Part A of the mid-term examination shall be Objective/ Quiz Question Paper containing 20
questions with 10 MCQs, 5 Fill in the Blanks and 5 Match the Following Questions and shall be evaluated
for 10 marks. Each question in Part A carries 0.5 marks in the mid-term examination. Mid I shall be
conducted at the middle of the semester with questions from 2.5 units of syllabus and Mid II at the end of
the semester with questions from the remaining 2.5 units of syllabus.
The Part B of the mid-term examination shall be Descriptive Question Paper for 20 marks. The
descriptive paper shall contain 6 questions out of which, the student has to answer 4 questions, each
carrying 5 marks. The questions shall be as follows:
Bloom's
[Link]. Type Question CO Answer
Level
What is a data structure?
(A) A programming language
1 MCQ (B) A way of organizing and storing data CO1 L1 B
(C) A type of algorithm
(D) A computer hardware component
Which of the following is NOT a linear data structure?
2 MCQ CO1 L1 D
(A) Array (B) Linked List (C) Stack (D) Tree
In a singly linked list, each node contains:
3 MCQ (A) Only data (B) Data and pointer to next node (C) Data and CO1 L1 B
two pointers (D) Only pointer
What is the time complexity of insertion at the beginning of a
4 MCQ singly linked list? CO1 L2 A
(A) O(1) (B) O(n) (C) O(log n) (D) O(n²)
Which operation is NOT permitted in a stack?
5 MCQ CO1 L2 D
(A) Push (B) Pop (C) Peek (D) Random access
A stack follows which principle?
6 MCQ CO1 L1 B
(A) FIFO (B) LIFO (C) Random (D) Priority based
In which condition does stack overflow occur?
(A) Stack is empty (B) Stack is full and push operation is
7 MCQ CO1 L2 B
attempted (C) Stack has one element (D) Pop operation on
empty stack
What is the output of postfix expression "5 6 2 + * 12 4 / -"?
8 MCQ CO1 L3 B
(A) 30 (B) 37 (C) 40 (D) 45
In a queue, insertion is performed at:
9 MCQ CO1 L1 B
(A) Front (B) Rear (C) Middle (D) Any position
Which of the following uses queue data structure?
10 MCQ (A) Recursion (B) BFS traversal (C) DFS traversal CO1 L2 B
(D) Function calls
What is an Abstract Data Type (ADT)?
(A) A data type with implementation details (B) A mathematical
11 MCQ CO1 L1 B
model with operations (C) A programming construct
(D) A hardware specification
12 MCQ The time complexity of searching an element in an unsorted CO1 L2 C
linked list is:
12
Aurora’s Scientific and Technological Institute
singly
contains data and a link to the next node.
linked list
The operation of adding an element to the stack is called
32 Fill CO1 L1 push
________.
The operation of removing an element from a queue is called dequeue /
33 Fill CO1 L1
________. deque
dynamic /
34 Fill A stack that is implemented using linked list has ________ size. CO1 L1
variable
35 Fill In a queue, deletion occurs at ________ end. CO1 L1 front
36 Fill The condition top = -1 indicates that the stack is ________. CO1 L1 empty
37 Fill A data structure that follows FIFO principle is ________. CO1 L1 queue
The process of visiting each node in a linked list is called
38 Fill CO1 L1 traversal
________.
39 Fill In postfix expression, operators come ________ operands. CO1 L1 after
implementa
40 Fill An ADT defines operations without revealing ________ details. CO1 L1
tion
Match the Following:
1. LIFO
2. FIFO
3. Push operation
4. Front pointer
5. Head pointer
6. Postfix
1-b
7. Circular queue
2-a
8. Deque
3-d
9. Peek
4-j
10. Underflow
5-c
41 Match CO1 L2 6-i
Options:
7-h
(a) Queue
8-g
(b) Stack
9-f
(c) Linked list
10-e
(d) Add to stack
(e) Remove from empty structure
(f) View top element
(g) Both ends insertion/deletion
(h) Efficient space utilization
(i) Reverse Polish Notation
(j) Queue starting point
[Link] Bloom's
Question CO
. Level
1 Define data structure. Explain various types of data structures with examples. CO1 L1
2 Explain the concept of abstract data type (ADT) with examples. CO1 L2
3 Describe array and linked representations of linear lists. CO1 L2
14
Aurora’s Scientific and Technological Institute
4 Explain insertion and deletion operations in a singly linked list with algorithm. CO1 L3
5 Write an algorithm to search an element in a linked list. CO1 L3
6 Compare arrays and linked lists. CO1 L2
7 Explain stack operations (push, pop, peek) using array representation. CO1 L2
8 Explain linked representation of stacks with an example. CO1 L3
9 Discuss applications of stacks. CO1 L2
10 Write algorithms to convert infix expression to postfix using stack. CO1 L3
11 Explain queue operations (enqueue, dequeue) using array representation. CO1 L2
12 Describe linked representation of queues. CO1 L3
13 Explain circular queue and its advantages. CO1 L2
14 Discuss overflow and underflow conditions in stacks and queues. CO1 L2
15 Write an algorithm to reverse a string using stack. CO1 L3
16 Compare stacks and queues. CO1 L2
17 Explain priority queue and its applications. CO1 L2
18 Write an algorithm for insertion and deletion in a circular linked list. CO1 L3
19 Explain memory allocation and deallocation in linked lists. CO1 L3
20 Summarize the importance of linear data structures in programming. CO1 L2
16
Aurora’s Scientific and Technological Institute
17
Aurora’s Scientific and Technological Institute
[Link] Bloom's
Question CO
. Level
1 Define dictionary and explain its applications. CO2 L1
2 Explain linear list representation of dictionaries with example. CO2 L2
3 Discuss the need for hashing and its advantages. CO2 L2
4 What is a hash function? Explain its properties. CO2 L2
5 Explain collision and its resolution techniques. CO2 L3
6 Differentiate between open addressing and separate chaining. CO2 L3
7 Describe linear probing with example. CO2 L2
8 Explain quadratic probing with example. CO2 L2
9 What is double hashing? How does it reduce clustering? CO2 L3
10 Describe rehashing and its purpose. CO2 L3
11 What is extendible hashing? Explain its working. CO2 L4
12 Compare static hashing and dynamic hashing. CO2 L3
13 Discuss performance analysis of hash tables. CO2 L4
14 Describe skip list representation of dictionary. CO2 L2
15 Explain insertion and deletion operations in a dictionary. CO2 L3
16 Write an algorithm for searching a key in a hash table. CO2 L3
17 What are the limitations of hashing? CO2 L2
18 Explain applications of hashing in real-world scenarios. CO2 L4
19 Differentiate between hashing and index-based searching. CO2 L3
20 Explain the concept of hash collision with a neat example. CO2 L2
Bloom's
[Link]. Type Question CO Answer
Level
In a Binary Search Tree (BST), the left child is:
1 MCQ (A) Greater than parent (B) Less than parent (C) Equal to parent CO3 L1 B
(D) No relation
What is the time complexity of searching in a balanced BST?
2 MCQ CO3 L2 B
(A) O(1) (B) O(log n) (C) O(n) (D) O(n²)
3 MCQ The worst-case time complexity of search in a skewed BST is: CO3 L2 C
18
Aurora’s Scientific and Technological Institute
20
Aurora’s Scientific and Technological Institute
Options:
(a) Left < Root < Right
(b) Height balanced
(c) Color property
(d) External storage
(e) Self-adjusting
(f) Height difference
(g) LL or RR case
(h) LR or RL case
(i) Gives sorted output
(j) Data only in leaves
[Link] Bloom's
Question CO
. Level
1 Define Binary Search Tree and explain its properties. CO3 L1
2 Explain the process of searching a key in a BST with example. CO3 L2
3 Describe insertion and deletion operations in a BST. CO3 L3
4 What are the advantages and disadvantages of BST? CO3 L2
5 Define AVL tree and explain balance factor with example. CO3 L2
6 Explain rotations in AVL tree with diagrams. CO3 L3
7 Describe insertion in an AVL tree. CO3 L3
8 Describe deletion in an AVL tree. CO3 L3
9 Explain structure and properties of B-Tree. CO3 L2
10 Discuss insertion and deletion operations in B-Tree. CO3 L3
11 Explain difference between B-Tree and B+ Tree. CO3 L2
12 Describe the balancing rules of Red-Black Tree. CO3 L3
13 Explain insertion algorithm in Red-Black Tree. CO3 L4
14 Explain deletion in Red-Black Tree. CO3 L4
15 Define splay tree and explain its working principle. CO3 L2
16 Discuss the advantages of self-balancing trees. CO3 L3
17 Compare AVL tree and Red-Black tree. CO3 L4
18 Write an algorithm for inorder traversal of BST. CO3 L2
19 Explain height balancing in AVL and B-Tree. CO3 L3
20 Discuss applications of tree data structures. CO3 L4
21
Aurora’s Scientific and Technological Institute
Bloom's
[Link]. Type Question CO Answer
Level
A graph consists of:
1 MCQ (A) Nodes only (B) Edges only (C) Vertices and edges (D) CO4 L1 C
Trees
In an undirected graph with n vertices, maximum number of
2 MCQ edges is: CO4 L2 B
(A) n (B) n(n-1)/2 (C) n(n-1) (D) n²
Adjacency matrix representation requires space complexity of:
3 MCQ CO4 L1 C
(A) O(V) (B) O(E) (C) O(V²) (D) O(V+E)
Adjacency list representation requires space complexity of:
4 MCQ CO4 L1 D
(A) O(V) (B) O(E) (C) O(V²) (D) O(V+E)
Which graph traversal uses a queue?
5 MCQ CO4 L1 B
(A) DFS (B) BFS (C) Both (D) Neither
Which graph traversal uses a stack?
6 MCQ CO4 L1 A
(A) DFS (B) BFS (C) Both (D) Neither
The time complexity of BFS and DFS is:
7 MCQ CO4 L2 C
(A) O(V) (B) O(E) (C) O(V+E) (D) O(V*E)
Quick Sort uses which technique?
8 MCQ (A) Greedy (B) Divide and conquer (C) Dynamic programming CO4 L2 B
(D) Backtracking
What is the average time complexity of Quick Sort?
9 MCQ CO4 L2 B
(A) O(n) (B) O(n log n) (C) O(n²) (D) O(log n)
What is the worst-case time complexity of Quick Sort?
10 MCQ CO4 L2 C
(A) O(n) (B) O(n log n) (C) O(n²) (D) O(2ⁿ)
The pivot selection in Quick Sort affects:
11 MCQ (A) Correctness (B) Performance (C) Space complexity (D) CO4 L2 B
Nothing
Heap Sort uses which data structure?
12 MCQ CO4 L1 C
A) Stack (B) Queue (C) Binary heap (D) Graph
What is the time complexity of Heap Sort?
13 MCQ CO4 L2 B
(A) O(n) (B) O(n log n) (C) O(n²) (D) O(log n)
Heap Sort is:
14 MCQ CO4 L1 B
(A) Stable (B) Unstable (C) Adaptive (D) Online
External sorting is used when:
15 MCQ (A) Data fits in memory (B) Data doesn't fit in memory (C) CO4 L2 B
Data is sorted (D) Data is small
K-way merge sort is used in:
16 MCQ (A) Internal sorting (B) External sorting (C) Quick sort (D) CO4 L2 B
Heap sort
In external merge sort, the number of passes required is:
17 MCQ CO4 L2 B
(A) log₂ n (B) logₖ (n/M) (C) n (D) k
18 MCQ A directed graph is strongly connected if: CO4 L2 B
(A) Some vertices are reachable (B) All vertices are reachable
22
Aurora’s Scientific and Technological Institute
from any vertex (C) Graph has cycles (D) Graph is weighted
Which sorting algorithm is best for external sorting?
19 MCQ (A) Quick Sort (B) Bubble Sort (C) Merge Sort (D) Insertion CO4 L2 C
Sort
The space complexity of Quick Sort is:
20 MCQ CO4 L2 B
(A) O(1) (B) O(log n) (C) O(n) (D) O(n²)
A complete binary tree is used in:
21 MCQ CO4 L1 B
(A) Quick Sort (B) Heap Sort (C) Merge Sort (D) Radix Sort
BFS finds:
22 MCQ (A) Longest path (B) Shortest path in unweighted graph (C) CO4 L2 B
Minimum spanning tree (D) Cycles
DFS can be used to detect:
23 MCQ (A) Shortest path (B) Cycles in graph (C) Minimum weight CO4 L2 B
(D) Maximum flow
In-place sorting means:
24 MCQ (A) Uses O(1) extra space (B) Uses O(n) extra space (C) Uses CO4 L1 A
no comparisons (D) Always stable
Quick Sort is preferred over Merge Sort when:
25 MCQ (A) Stability is required (B) Space is limited (C) Data is on disk CO4 L2 B
(D) Data is linked list
The build heap operation takes time:
26 MCQ CO4 L2 A
(A) O(n) (B) O(n log n) (C) O(n²) (D) O(log n)
In a graph, a path that visits every vertex exactly once is called:
27 MCQ (A) Euler path (B) Hamiltonian path (C) Shortest path (D) CO4 L1 B
Simple path
Which representation is better for dense graphs?
28 MCQ (A) Adjacency matrix (B) Adjacency list (C) Edge list (D) All CO4 L2 A
same
The partition function in Quick Sort:
29 MCQ (A) Merges arrays (B) Rearranges elements around pivot (C) CO4 L2 B
Builds heap (D) Creates tree
Multi-way merge in external sorting uses:
30 MCQ CO4 L2 B
(A) Stack (B) Min-heap (C) Max-heap (D) Queue
tree / acyclic
31 Fill A graph with no cycles is called a ________. CO4 L1 graph /
DAG
________ traversal explores as far as possible along each branch Depth-first /
32 Fill CO4 L1
before backtracking. DFS
________ traversal visits all neighbors before moving to next Breadth-first
33 Fill CO4 L1
level. / BFS
In Quick Sort, the element used to partition the array is called
34 Fill CO4 L1 pivot
________.
35 Fill Heap Sort first builds a ________ heap from the array. CO4 L1 max
The process of selecting and removing the root in Heap Sort is heapify /
36 Fill CO4 L1
called ________. extract-max
secondary
External sorting uses ________ for sorting data that doesn't fit in
37 Fill CO4 L1 storage /
main memory.
disk
In external merge sort, sorted runs are merged using ________ k-way /
38 Fill CO4 L1
merge. multi-way
39 Fill A graph where edges have direction is called a ________ graph. CO4 L1 directed
23
Aurora’s Scientific and Technological Institute
40 Fill The ________ matrix stores 1 if edge exists, 0 otherwise. CO4 L1 adjacency
Match the Following:
1. BFS
2. DFS
3. Quick Sort
4. Heap Sort
5. External Sort
6. Adjacency matrix 1-b
7. Pivot 2-c
8. Heapify 3-a
9. Merge phase 4-j
10. Graph cycle 5-h
41 Match CO4 L2 6-e
Options: 7-f
(a) Divide and conquer 8-d
(b) Uses queue 9-i
(c) Uses stack 10-g
(d) Binary heap property
(e) O(V²) space
(f) Partition element
(g) DFS detection
(h) Disk-based sorting
(i) Combining sorted runs
(j) Complete binary tree
[Link] Bloom's
Question CO
. Level
Explain the different methods of graph representation: adjacency matrix,
1 CO4 L2
adjacency list, and edge list. Compare their space and time complexities.
Describe the Breadth-First Search (BFS) algorithm for graph traversal. Write the
2 CO4 L3
algorithm and trace its execution on a sample graph.
Explain the Depth-First Search (DFS) algorithm. Write both recursive and
3 CO4 L3
iterative implementations. Demonstrate with an example graph.
Compare BFS and DFS traversal methods in terms of implementation,
4 CO4 L2
applications, space complexity, and use cases.
Describe how DFS can be used to detect cycles in a directed graph. Write an
5 CO4 L3
algorithm and provide an example.
Explain how BFS can be used to find the shortest path in an unweighted graph.
6 CO4 L3
Provide an algorithm and example.
What is Quick Sort? Explain the partition algorithm in detail. Write the complete
7 CO4 L3
Quick Sort algorithm with an example showing all recursive calls.
Analyze the time complexity of Quick Sort for best, average, and worst cases.
8 CO4 L2
What factors affect its performance? How can worst-case be avoided?
Describe different pivot selection strategies in Quick Sort: first element, last
9 CO4 L2
element, median-of-three, and random. Compare their effectiveness.
What is Heap Sort? Explain the structure of a binary heap and its properties.
10 CO4 L2
Describe the heapify operation with examples.
Write detailed algorithms for building a max-heap and performing Heap Sort.
11 CO4 L3
Trace the execution on the array [4, 10, 3, 5, 1, 8, 7, 2].
24
Aurora’s Scientific and Technological Institute
Compare Quick Sort and Heap Sort in terms of time complexity, space
12 complexity, stability, and practical performance. When would you prefer one CO4 L2
over the other?
What is external sorting? Why is it necessary? Explain the model for external
13 CO4 L2
sorting including concepts of runs, buffers, and I/O operations.
Describe the external merge sort algorithm in detail. Explain the process of
14 CO4 L3
creating sorted runs and merging them. How many passes are required?
Explain k-way merge in external sorting. How does it optimize the number of
15 CO4 L3
passes? Write an algorithm using a min-heap for k-way merge.
Discuss the applications of graph traversal algorithms in real-world problems
16 CO4 L2
such as social networks, web crawling, and network routing.
Explain topological sorting of a directed acyclic graph (DAG) using DFS.
17 CO4 L3
Provide an algorithm and example showing the topological order.
Describe how to find connected components in an undirected graph using BFS or
18 CO4 L3
DFS. Write an algorithm and provide an example.
Compare internal and external sorting. Discuss the challenges in external sorting
19 CO4 L2
and techniques to optimize disk I/O operations.
Explain the concept of replacement selection in external sorting. How does it
20 CO4 L2
help in creating longer initial runs?
Bloom's
[Link]. Type Question CO Answer
Level
Pattern matching is used in:
1 MCQ (A) Text editors (B) Search engines (C) DNA sequencing (D) CO5 L1 D
All of these
In pattern matching, the text to be searched is called:
2 MCQ CO5 L1 C
(A) Pattern (B) String (C) Text (D) Substring
What is the time complexity of brute force pattern matching?
3 MCQ CO5 L2 C
(A) O(n) (B) O(m) (C) O(nm) (D) O(n+m)
The Boyer-Moore algorithm scans the pattern from:
4 MCQ (A) Left to right (B) Right to left (C) Middle to ends (D) CO5 L1 B
Random
The bad character heuristic is used in:
5 MCQ CO5 L1 C
(A) Brute force (B) KMP (C) Boyer-Moore (D) Rabin-Karp
What is the best-case time complexity of Boyer-Moore
6 MCQ algorithm? CO5 L2 A
(A) O(n/m) (B) O(n+m) (C) O(nm) (D) O(m)
KMP algorithm uses:
7 MCQ (A) Bad character table (B) Failure function/prefix table (C) CO5 L1 B
Good suffix table (D) Hash function
What is the preprocessing time complexity of KMP algorithm?
8 MCQ CO5 L2 A
(A) O(m) (B) O(n) (C) O(nm) (D) O(1)
What is the matching time complexity of KMP algorithm?
9 MCQ CO5 L2 B
(A) O(m) (B) O(n) (C) O(nm) (D) O(n+m)
The prefix function in KMP stores:
10 MCQ (A) Character positions (B) Length of longest proper prefix that CO5 L2 B
is also suffix (C) Pattern length (D) Text length
11 MCQ A trie is used for: CO5 L1 B
(A) Sorting numbers (B) String storage and retrieval (C) Graph
25
Aurora’s Scientific and Technological Institute
The ________ algorithm compares pattern with text character by brute force /
31 Fill CO5 L1
character. naive
The ________ algorithm scans pattern from right to left but text Boyer-
32 Fill CO5 L1
from left to right. Moore
KMP algorithm uses a ________ function to avoid unnecessary failure /
33 Fill CO5 L1
comparisons. prefix / next
34 Fill A ________ is a tree-based data structure for storing strings. CO5 L1 trie
35 Fill In a trie, each ________ from root to leaf represents a string. CO5 L1 path
________ trie reduces space by merging nodes with single Compressed
36 Fill CO5 L1
children. / Radix
37 Fill A ________ trie stores all suffixes of a given string. CO5 L1 suffix
The time complexity of KMP algorithm is ________, where n is O(n+m) /
38 Fill CO5 L1
text length and m is pattern length. linear
Boyer-Moore algorithm uses ________ heuristic and good suffix bad
39 Fill CO5 L1
heuristic. character
string /
40 Fill Tries support efficient ________ operations like prefix matching. CO5 L1 lexicographi
c
Match the Following:
1. Brute force
2. Boyer-Moore
3. KMP
4. Standard trie
5. Compressed trie
6. Suffix trie
7. Failure function
1-a
8. Bad character
2-b
9. Auto-complete
3-c
10. DNA matching
4-d
41 Match CO5 L2 5-e
Options:
6-f
(a) O(nm) complexity
7-g 8-h
(b) Right to left scan
9-i
(c) Prefix table
10-j
(d) All string characters
(e) Radix tree
(f) All suffixes
(g) KMP preprocessing
(h) Boyer-Moore heuristic
(i) Trie application
(j) Pattern matching use
[Link] Bloom's
Question CO
. Level
Explain the brute force pattern matching algorithm. Write the algorithm and
1 CO5 L3
analyze its time complexity. Demonstrate with an example.
Describe the Boyer-Moore pattern matching algorithm. Explain the bad character
2 CO5 L2
heuristic with examples. How does it improve over brute force?
27
Aurora’s Scientific and Technological Institute
Explain the good suffix heuristic in the Boyer-Moore algorithm. How does it
3 CO5 L2
work in conjunction with the bad character heuristic?
Write a detailed algorithm for the Boyer-Moore pattern matching. Trace its
4 CO5 L3
execution on text "ABCABAABABCABA" with pattern "ABABC".
What is the Knuth-Morris-Pratt (KMP) algorithm? Explain how it avoids
5 CO5 L2
unnecessary character comparisons. Discuss its advantages over brute force.
Describe the construction of the failure function (prefix function) in the KMP
6 CO5 L3
algorithm. Write the algorithm and demonstrate with pattern "ABABCABAB".
Explain the complete KMP pattern matching algorithm with preprocessing and
7 CO5 L3
matching phases. Provide a detailed example with text and pattern.
Trace the KMP algorithm for text "ABABDABACDABABCABAB" and pattern
8 CO5 L3
"ABABCABAB". Show the failure function values and matching process.
Compare the three pattern matching algorithms: Brute Force, Boyer-Moore, and
9 KMP in terms of time complexity, preprocessing requirements, and practical CO5 L2
performance.
What is a trie (prefix tree)? Explain its structure and properties. How is it
10 CO5 L2
different from other tree structures like BST?
Describe the insertion and search operations in a standard trie. Write algorithms
11 CO5 L3
and demonstrate by inserting words: "the", "there", "their", "these", "this".
Explain the deletion operation in a trie. What are the different cases to consider?
12 CO5 L3
Provide an algorithm and example.
What is a compressed trie (radix tree or Patricia trie)? How does it differ from a
13 CO5 L2
standard trie? Explain with examples showing space savings.
Describe the construction of a compressed trie. Write the algorithm for
14 CO5 L3
compressing a standard trie and demonstrate with an example.
What is a suffix trie? Explain its construction for a given string. How is it useful
15 CO5 L2
in pattern matching and substring search problems?
Construct a suffix trie for the string "banana$". Show all suffixes and the
16 CO5 L3
resulting trie structure. Demonstrate how to search for pattern "ana".
Discuss the applications of tries in real-world scenarios such as auto-completion,
17 CO5 L2
spell checking, IP routing, and dictionary implementations.
Compare standard tries, compressed tries, and suffix tries in terms of space
18 CO5 L2
complexity, time complexity for operations, and use cases.
Explain how suffix tries can be used to find all occurrences of a pattern in a text
19 CO5 L3
in linear time. Provide an algorithm and example.
Describe the concept of longest common prefix using tries. Write an algorithm to
20 CO5 L3
find the longest common prefix among a set of strings using a trie.
28
Aurora’s Scientific and Technological Institute
11.1. Unit I
[Link] Reg/
Year Question Marks CO Bloom
. Suppl
29
Aurora’s Scientific and Technological Institute
30
Aurora’s Scientific and Technological Institute
12. Assignments
Assignments are part of Continuous Internal Evaluation (CIE) and are evaluated for 5 marks. Student
shall submit two assignments in a course and the average of 2 Assignments each for 5 marks shall be
taken. The first assignment should be submitted before the conduct of the first mid-term examination, and
the second assignment should be submitted before the conduct of the second mid-term.
Bloom’
[Link]. Question CO
s Level
Write a C program to implement a singly linked list with insertion, deletion, and CO1 L3
1
display operations.
Develop a program to perform searching for a specific element in a singly linked CO1 L3
2
list.
Design a C program to reverse a singly linked list using iterative and recursive CO1 L5
3
methods.
Implement stack operations (push, pop, peek, display) using arrays. CO1 L3
4
Implement stack operations using linked list representation. CO1 L4
5
Apply stack concept to evaluate a postfix expression using C. CO1 L4
6
Write a C program to convert an infix expression to postfix using stack CO1 L4
7
operations.
Implement queue operations (enqueue, dequeue, display) using arrays. CO1 L3
8
Design a C program to implement a circular queue using arrays. CO1 L4
9
Implement a queue using linked list representation and perform enqueue and CO1 L4
10
dequeue operations.
Write a program to represent a dictionary using a linear list and perform CO2 L4
11
insertion and deletion operations.
Develop a program to implement a skip list and perform search operation CO2 L5
12
efficiently.
Design a C program to implement a hash table using separate chaining CO2 L5
13
technique.
Write a program to implement hash table using open addressing (linear CO2 L5
14
probing) for collision resolution.
Design a program to demonstrate quadratic probing and double hashing CO2 L6
15
collision resolution techniques.
Implement rehashing and extendible hashing in a hash table for dynamic CO2 L6
16
resizing.
Write a C program to construct a Binary Search Tree (BST) and perform CO3 L4
17
insertion and searching operations.
Implement deletion operation in a Binary Search Tree and display the tree after CO3 L5
18
each deletion.
Write a C program to construct a B-Tree and perform insertion operation. CO3 L5
19
Design and implement a B+ Tree for efficient search and indexing operations. CO3 L6
20
31
Aurora’s Scientific and Technological Institute
32
Aurora’s Scientific and Technological Institute
13. Seminars:
Seminars are part of the Continuous Internal Evaluation and are evaluated for five marks. Seminars are to
be given by each learning group of three students on a topic in the concerned subject. This assessment
shall be completed before II Mid-Term Examination.
33
Aurora’s Scientific and Technological Institute
Unit IV – Graph
21 Use of Graph Algorithms in Social Network Analysis CO4 L6
Applications
Pattern Matching Algorithms and Their Use in Text Unit V – Pattern
22 CO5 L5
Processing Matching
Trie and Suffix Trie Data Structures for Fast String
23 Unit V – Tries CO5 L6
Searching
Modern Applications of Trie Structures in Spell Checking Unit V – Tries and
24 CO5 L6
and Auto-completion Pattern Matching
Integrating Linear Structures, Trees, Graphs, Hashing, and Comprehensive – CO1–
25 L6
String Processing for Real-World Data Management Units I to V CO5
34