Updated Ds Final Coursepack 24 25
Updated Ds Final Coursepack 24 25
SCHEM
E
The scheme is an overview of work-integrated learning opportunities and gets students out into the
real world. This will give what a course entails.
Practical
Tutorial
Theory
delivery
study
Self-
SEE
Practical 1 2
CIE
Self-study
Total 4 5 45 15 50% 50%
Course Lead Dr. Pradeep Kumar Singh Course Mr. Anil Gankotiya
Coordinator
Names Theory Practical
Course Dr. Pradeep Kumar Singh Dr. Pradeep Kumar Singh
Instructors Dr. Sanjeev Kumar Prasad Dr. Sanjeev Kumar Prasad
Dr. Anuj Kumar Singh Dr. Anuj Kumar Singh
Dr. Farhan Sufyan Dr. Farhan Sufyan
Ashutosh Kumar Ashutosh Kumar
Mr. Anil Gankotiya Dr. Ankur Gogai
Dr. Ankur Gogai Mr. Anil Gankotiya
Rahul Swami Rahul Swami
Nitin Sondhi Nitin Sondhi
Akhilesh Kumar (402) Akhilesh Kumar (402)
Sharad Gupta Sharad Gupta
COURSE OVERVIEW
Data structures are one of the foundation subjects for the computer science program. This course enables
the students to understand and apply the concepts of Linear Data Structure and Non-linear Data Structure
approaches in different scenarios of information processing and storing and organizing data in a
computer's memory so that these data can be used efficiently later. It includes identifying the issue in that
particular scenario required to deal with the data structures approaches, considering several techniques to
address it, and selecting the best data structure to store, organize, and efficiently use the stored data. In
this course, Data structures include- Array, lists, stacks, queues, trees, and graphs. The Java programming
language will be used to demonstrate the concepts discussed in the lecture, and programming problems
must be completed in Java.
COURSEPACK | FORMAT
PREREQUISITE COURSE
If, yes please fill in the Details Prerequisite course code & name
E1UA103C Programming Paradigm
with Problem Solving
COURSE OBJECTIVE
This course will introduce students to searching and sorting as well as data structures like stack, queue, and
binary tree. Students will write many programs around these topics during this course.
INTEGRATED
Remember Understand Apply Analyse Evaluate Create
CO No.
KL1 KL 2 KL 3 KL 4 KL 2 KL 6
E1PY203B.1 √
E1PY203B.2 √
E1PY203B.3 √ √
E1PY203B.4 √
2. Problem Analysis: Identify, formulate, research literature, and solve complex computing problems
reaching substantiated conclusions using fundamental principles of mathematics, computing sciences, and
relevant domain disciplines.
3. Design /Development of Solutions: Design and evaluate solutions for complex computing problems,
and design and evaluate systems, components, or processes that meet specified needs with appropriate
COURSEPACK | FORMAT
consideration for public health and safety, cultural, societal, and environmental considerations.
5. Modern Tool Usage: Create, select, adapt and apply appropriate techniques, resources, and modern
computing tools to complex computing activities, with an understanding of the limitations.
6. Professional Ethics: Understand and commit to professional ethics and cyber regulations,
responsibilities, and norms of professional computing practices.
7. Life-long Learning: Recognize the need, and have the ability, to engage in independent learning for
continual development as a computing professional.
8. Project management and finance: Demonstrate knowledge and understanding of the computing and
management principles and apply these to one’s own work, as a member and leader in a team, to manage
projects and in multidisciplinary environments.
9. Communication Efficacy: Communicate effectively with the computing community, and with society
at large, about complex computing activities by being able to comprehend and write effective reports,
design documentation, make effective presentations, and give and understand clear instructions.
10. Societal and Environmental Concern: Understand and assess societal, environmental, health, safety,
legal, and cultural issues within local and global contexts, and the consequential responsibilities relevant to
professional computing practices.
11. Individual and Team Work: Function effectively as an individual and as a member or leader in
diverse teams and in multidisciplinary environments.
12. Innovation and Entrepreneurship: Identify a timely opportunity and using innovation to pursue that
opportunity to create value and wealth for the betterment of the individual and society at large.
PO 1 PO 2 PO 3 PO 4 PO 5 PO 6 PO 7 PO 8 PO 9 PO 10 PO 11 PO 12 PSO1 PSO2
CO 1 3 3 2 2 2 - 2 1 - - 1 1 3 3
CO 2 3 3 3 3 3 - 2 2 - - 2 2 3 3
CO 3 3 3 3 2 3 - 2 2 - - 2 3 3 3
CO 4 3 3 3 2 3 - 2 2 - - 2 3 3 3
COURSEPACK | FORMAT
Note: 1-Low, 2-Medium, 3-High
COURSE ASSESSMENT
The course assessment patterns are the assessment tools used both in formative and summative examinations.
* Passing criteria – 30% of marks to be secured in the lab exam conducted by two examiners (one
internal + one external).
SLOW and FAST LEARNER: It is required to complete this process after completion of
25% of syllabus.
For Integrated Course: Through problem based Learning OR through Lab Experiments
For Theory Course : Through problem based Learning OR through IA-1
For Comprehensive : Through problem based Learning OR through Project evaluation
COURSE CONTENT
Introduction of Array & Linked List:
COURSEPACK | FORMAT
Introduction Basic Terminology, Elementary Data Organization, Data Structure operations,
Abstract Data Type (ADT) - Algorithm Complexity and Time-Space trade-off, Efficiency of an
Algorithm, Asymptotic notations: Big Oh, Big Theta and Big Omega.
Arrays: Array Definition, Representation and Analysis - Single and Multidimensional Arrays- Row
Major Order, and Column Major Order,
Application of Arrays: Sparse Matrices and their representations.
Stack: Representation and Implementation of Stack (Array and Linked list) - Operations on Stack –
push and pop Application of Stack: Conversion of Infix to Prefix and Postfix Expressions -
Evaluation of postfix expression – Recursion. Principles of recursion, Tail recursion, Problem
solving using recursion with examples such as Tower of Hanoi.
Trees:
Binary Trees: Basic Terminology - Binary Tree representation - Complete Binary Tree - Extended
Binary Trees - Binary Trees Traversals-: Inorder, Preorder and Postorder
Binary Search Trees: Binary Search Tree Operation of Insertion, Deletion, Searching & Modification
of data in Binary Search Tree, AVL Trees, B-Trees.
Graphs:
Graphs: Basic Terminology and Representations – Graphs (Adjacency Matrices, Adjacency List) &
Multi-Graphs - Directed Graphs - Adjacency Matrices - Graph Traversals (Depth First Search and
Breadth First Search) - Spanning Trees - Minimum Cost Spanning Trees- Prims and Kruskal
algorithm
COURSEPACK | FORMAT
LESSON PLAN FOR INTEGRATED COURSES
FOR THEORY 15 weeks * 3 Hours = 45 Classes) (1credit = 1Lecture Hour)
FOR PRACTICAL 15 weeks * 2Hours = 30 Hours lab sessions (1 credit = 2 lab hours)
L- Theory
No
Topic for Delivery Tutorial
Skills Competency
COURSEPACK | FORMAT
19 Merge Sort Theory
Trees: Binary Tree, and Its array and linked list Students will
37 representation
Theory
be able to
CO3, CO4
implement the
38 Strict Binary Tree, Complete Binary Tree Theory BST tree using
COURSEPACK | FORMAT
Tree Traversal algorithms: In-order, Pre-order and Post-
39 order and Level Order
Theory
L- Practical
No
Topic for Delivery Plan
COURSEPACK | FORMAT
12 Write a recursive program to find the nth Fibonacci number.
17 Write a program to implement linked list by adding or removing element from last.
Practical
Write a program to implement linked list by adding or removing element from first
18 position.
19 Write a program to implement a doubly linked list.
Practical
20 Write a program to implement a circular linked list.
Write a program to implement a linked list by adding or removing elements at a given
21 position.
Practical
22 Write a program to count number of elements in a linked list.
COURSEPACK | FORMAT
34 Write a program to implement a binary tree using linked list.
BIBLIOGRAPHY
Text Book
1. Aaron M. Tenenbaum, Yedidyah Langsam and Moshe J. Augenstein “Data
Structures”.
2. Sahni Sartaj, “Data structures, algorithms, and applications in Java”, McGraw-Hill
Reference Books
1. Michael T. Goodrich; Roberto Tamassia; Michael H. Goldwasser; Subhasish Banerjee “Data
Structures and Algorithms in Java”, Wiley.
2. Jean Paul Trembley and Paul G. Sorenson, “An Introduction to Data Structures with
applications”, McGraw Hill
3. James Cutajar “Beginning Java Data Structures and Algorithms”, O’Reilly.
4. John Hubbard "Data Structures with Java" Schaum's Outline Series.
5. Narasimha Karumanchi "Data Structures and Algorithms Made Easy in Java" CareerMonk
Webliography
1. Online Material 1
a) https://cse.iitkgp.ac.in/~dsamanta/javads/index.htm
b) https://www.geeksforgeeks.org/data-structures/
c) https://www.javatpoint.com/data-structures-in-java
d) https://www.programiz.com/dsa
e) https://www.w3resource.com/
COURSEPACK | FORMAT
f) https://www.javaguides.net/p/data-structures-and-algorithms-in-java.html
2. Online Material 2 (SWAYAM/NPTEL/MOOCs Certification )
a) Data Structure and Algorithms
URL: https://nptel.ac.in/courses/106102064
b) Data Structures using c programming
URL: https://onlinecourses.swayam2.ac.in/nou23_cs13/preview
c) Programming and Data Structures
URL: https:// https://nptel.ac.in/courses/106106130
d) Data Structures and Algorithms – Self Paced (GeeksforGeeks)
URL: https://practice.geeksforgeeks.org/courses/dsa-self-paced
3. Online Material 3 (SELF-LEARNING THROUGH MOOCs (Cognitive Skills )
Certification
a) https://www.hackerrank.com
b) https://www.codechef.com
c) https://exercism.org/
d) https://www.codewars.com/
e) https://www.topcoder.com/
f) https://www.coderbyte.com/
PRACTICE PROBLEMS:
S.No
Problems
.
Write a program to find the number of elements in the largest increasing sequence in an
1
array.
2 Write a program to remove duplicates from an array.
3 Write a Program to find the transpose of a matrix.
4 Write a program to find the second smallest element in a linked list.
5 Write a program to check whether doubly linked list elements make palindrome or not.
Given an array, arr[2………11][5………20] with base value 200, and the size of each
6
element is 2 Byte in memory. Find the address of arr[7][11] with the help of row-major order.
COURSEPACK | FORMAT
Given an array, arr[2:11, -3:4, 7:18] with a base value of 300 and the size of each element is
7 3 Bytes in memory find the address of element arr[4][-2][12] with the help of row-major
order?
8 Write a program to calculate the average value of array elements.
Write a pseudocode to implement a stack of size N using an array. The elements in the stack
9 are to be integers. The operations to be supported are PUSH, POP, and DISPLAY. Take into
account the exceptions of stack overflow and stack underflow.
A circular queue has a size of 5 and has 3 elements 10,20 and 40 where F=2 and R=4. After
inserting 50 and 60, what is the value of F and R. Trying to insert 30 at this stage what
10
happens? Delete 2 elements from the queue and insert 70, 80 & 90. Show the sequence of
steps with necessary diagrams with the value of F & R.
Construct an expression tree for the expression (a+b*c) + ((d*e+f)*g). Give the outputs when
11
you apply in-order, preorder, and post-order traversals.
Given input {4371, 1323, 6173, 4199, 4344, 9679, 1989} and a hash function h(x) =x mod
12 10. Prepare the results for the following: i) Open addressing hash table using linear probing.
(ii)Open addressing hah table using quadratic probing.
13 Write a bubble sort program with a condition that its best-case complexity will be O(n).
16 Write a recursive program to find the greatest common divisor of two numbers.
Develop a program to merge two sorted linked lists (P & Q). Assume that they are available
17
to get a single sorted list S. Eg. P:1->2->45->56 Q:3->24->56->63->66
Data are pushed to (PUSH operation) and popped from (POP operation) a stack in the
following order:PUSH 3; TOP; PUSH 7; TOP; PUSH 6; PUSH 9; TOP; POP; POP; TOP;
21
where the PUSH, POP, and TOP are the standard operations of the stack. Write the values
returned by TOP for the sequence of operations above.
Let A be a square matrix of size n x n. Consider the following program. What is the expected
22
output?
COURSEPACK | FORMAT
C = 100
for i = 1 to n do
for j = 1 to n do
{
Temp = A[i][j] + C
A[i][j] = A[j][i]
A[j][i] = Temp - C
}
for i = 1 to n do
for j = 1 to n do
Output(A[i][j]);
Following pseudo code of a function that takes a number as an argument, and uses a stack S
to do processing.What is the expected output?
void fun(int n)
{
Stack S; // Say it creates an empty stack S
while (n > 0)
{
23 // This line pushes the value of n%2 to stack S
push(&S, n%2);
n = n/2;
}
// Run while Stack S is not empty
while (!isEmpty(&S))
Following pseudo-code of a function that takes a Queue as an argument, and uses a stack S to
do processing. What is the expected output?
COURSEPACK | FORMAT
// Run while Stack S is not empty
while (!isEmpty(&S))
{
enQueue(Q, pop(&S));
}
}
25 Write a program to reverse the number using stack.
26 Write a program to reverse a stack using recursion, without using any loop.
40 Construct a MAX-HEAP tree for the following nodes: 70, 60, 50, 40, 30, 20, 5, 1, 7, 80, 90
How many minimum number of swap operations are needed to convert the following array
41
into the heap with maximum element at root: 89, 19, 40, 17, 12, 10, 2, 5, 11, 6, 9, 70
What would be the post-order of the tree if preorder and in-order traversals are given:
42
PREORDER: ABDECFG, INORDER: DBEAFCG
43 Write a Program to implement Dequeue using array.
A Binary Search Tree contains the following Pre-order: 5, 3, 1, 2, 4, 6, 8, 7. What will be the
44
Post-order?
COURSEPACK | FORMAT
45 Simulate the result of inserting 2, 1, 4, 5, 9, 3, 6, and 7 into an initially empty BST Tree.
52 Write a program to implement Collision resolution in the Hash table using linear probing.
53 Write a program to implement Collision resolution in the Hash table using quadratic probing.
COURSEPACK | FORMAT