Documente Academic
Documente Profesional
Documente Cultură
Course Objective: The fundamental study, analysis, and implementation of basic data
structures and algorithms for the development of common practical applications.
Course Rationale: Student will explore several fundamental data structures and algorithms
in computer science and learns to implement them in C. Use of appropriate Data Structures
enables a computer system to perform its task more efficiently, by influencing the ability of
computer to store and retrievedata.
1
Mapping of Course Outcomes (CO) to Program outcomes:
2
trees and red trees and red
blacktrees) black trees
Definite the
various
Explain the Solve the Compare and
representations
heap sort and shortest path contrast the
of graphs,
priority and minimum shortest path
CO 4 4 topological sort,
queues, and spanning tree and minimum
applications of
Minimum problems using spanning tree
graph, and
spanning trees algorithms algorithms
shortest path
algorithms
Appraise and Discriminate the
Exemplify the
Use the linear Differentiate significance of both
linear and
Recall the linear and nonlinear the linear and linear and nonlinear
nonlinear data
CO5 5 and nonlinear data structures nonlinear data data structures with
structures with
data structures with real world structures respect to real world
real world
applications based on their applications.
applications
properties
PROGRAM OUTCOMES & PROGRAM SPECIFIC OUTCOMES (POs/PSOs)
Syllabus:
Reference Books:
1. A.V.Aho, J. E. Hopcroft, and J. D. Ullman, ―Data Structures And Algorithms‖,
Pearson Education, First Edition Reprint2003.
2. Horowitz, Sahni, Anderson Freed, ―Fundamentals of datastructures in C‖ , Second
Edition-2007.
3. R. F. Gilberg, B. A. Forouzan, ―Data Structures‖, Second Edition, Thomson India
Ed ition, 2005
4. Robert Kruse, C.L. Tondo, Bruce Leung, Shashi Mogalla, ―Data Structures &
Program Design in C‖, FourthEdition-2007.
WEB REFERNCES/MOOCS:
1. https://nptel.ac.in/courses/106102064
2. https://nptel.ac.in/courses/106101060/4
3. https://www.edx.org/course/algorithms-and-data-structures-1
4. https://in.udacity.com/course/intro-to-algorithms--cs215
5. https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-046j-
introduction-to-algorithms-sma-5503-fall-2005/video-lectures/lecture-10-red-black-
trees-rotations-insertions-deletions/lec10.pdf
4
COURSE DELIVERY PLAN:
Book No[CH Teaching-
Sess. Evaluation
CO COI Topic (s) No][Page No] Learning
No. Components
Methods
T BOOK [1],
CH 2.1-2.4,
Mathematical Background, Model, what to Page no 31-36
Lecturing, Semester in
1 1 4 analyze W REF [2],
Discussion Exam-I
Lecture-4:
Asymptotic
notations
T BOOK [1],
CH 2.1-2.4,
Page no 31-36
Running time calculations, A simple Lecturing, Semester in
2 1 4 W REF [2],
example General rules Discussion Exam-I
Lecture-4:
Asymptotic
notations
T BOOK [1],
CH 7.2
Page no 236-
237
W REF [1], Lecturing, Semester in
3 1 4 Insertion sort and its time complexity
Lecture 1: Discussion Exam-I
Introduction to
Data
structures and
Algorithms
T BOOK [1],
CH 7.4
Lecturing, Semester in
4 1 4 shell sort and its time complexity Page no 238-
Discussion Exam-I
240
T BOOK [1],
CH 7.5
Lecturing, Semester in
5 1 4 Heap sort and its analysis Page no 242-
Discussion Exam-I
244
T BOOK [1],
CH 7.6
Page no 246- Lecturing, Semester in
6 1 3 Merge sort Discussion Exam-I
250
5
Book No[CH Teaching-
Sess. Evaluation
CO COI Topic (s) No][Page No] Learning
No. Components
Methods
Page no 266- Exam-I
271
Semester in
Lecturing,
19 Revision Discussion Exam-I
6
Book No[CH Teaching-
Sess. Evaluation
CO COI Topic (s) No][Page No] Learning
No. Components
Methods
Semester in
Lecturing,
28 3 2 Implementation of red black trees W.Ref [5] Discussion Exam-II
7
Book No[CH Teaching-
Sess. Evaluation
CO COI Topic (s) No][Page No] Learning
No. Components
Methods
305
T BOOK [1], Semester in
Chapter 9.3 Lecturing, Exam-II
35 4 2 Shortest path algorithms Pages 306- Discussion
310
T BOOK [1], Semester in
Chapter Exam-II
Lecturing,
36 4 2 Dijkstra‘s algorithm 9.3.2
Discussion
Pages 311-
319
T BOOK [1], Semester in
Chapter Exam-II
Minimum spanning tree Prim‘s 9.5.1 Lecturing,
37 4 2 Discussion
algorithm Pages329-
331
T BOOK [1], Semester in
Chapter Exam-II
Lecturing,
38 4 2 Krushkal‘s algorithm 9.5.2
Discussion
Pages 332-
334
Semester in
Lecturing,
39 Revision Discussion Exam-II
8
SESSION WISE TEACHING – LEARNING PLAN
SESSION NUMBER: 01
Session Outcome: 1) Students are come to know, what is time and space complexity?
2) Students are able to analyse the complexity of any type of algorithms.
05 Conclusion
SESSION NUMBER: 02
Session Outcome: 1. Calculate the running time of an algorithm .
2. Students are able to identify the incremental order of time complexity
Active
Time in Teaching– Learn
Topic
Minut BTL Learning ing
es Method Meth
ods
Lecture-1
Running time calculations, A simple example General rules
9
II) Problem
For( i=0; i < n-1 ; i++)
{ For (j=0;j<m-2;j++)
Printf(―*‖);
Printf(―\n‖);
}
III) Problem
For( i=0; i < n ; i++)
{ For (j=0;j<n;j++)
Printf(―*‖);
Printf(―\n‖);
}
SESSION NUMBER: 03
Session Outcome: 1. Implement insertion sort.
2. Analyze time complexity of insertion sort.
Teaching– Active
Time in BT
Topic Learning Learning
Minutes L Method Methods
5 Recap
Practice session-1:
Consider there are 10 group of members in cinema hall for
taking tickets from counter, arrange the group of members in a
10 line according to the height of a persons. The height of persons 3
are given in centimeters as Lecturing,
follows:165,170,145,150,170,120,135,145,160,130. Discussion
After each iteration, draw the elements in array.
Sub topic -1 (Lecture):
20 2
Explain How insertion sort works and analyze its time
complexity.
Algorithm:
1) Read ―n‖ elements as input in array
2) Process
for (i = 1 ; i < n ; i++)
{
J = i;
while((j > 0) && (a[J] < a[J-1]))
{
t = a[J];
a[J] = a[J-1];
a[J-1] = t;
J--;
}
SESSION NUMBER:04
Session Outcome: 1. Implement shell sort
2. Analyze time complexities
Teaching– Active
Time in BT
Topic Learning Learning
Minutes L
Method Methods
5 Lecture
2
A lower bound for simple sorting algorithms
Subtopic -1 (Lecture):
10 Explain how shell sort works using shell's original sequence:
2
N/2, N/4, ..., 1 (repeatedly divide by 2). Explain Hibbard,
Sedgewick increments.
20 Ask the students to implement shell sort by using insertion sort QUIZ
3 Lecturing,
independently for each pass for practice session 1.
Discussion
Algorithm:
1) Read ―n‖ elements as input in array
2) Process
m=n/2;
while(m>0)
{
for( i=m;i<n;i++)
{
for(j=i-m;j>=0;j=j-m)
{
if (a[j] >a[j+m])
{
t=a[j];
a[j]=a[j+m];
a[j+m]=t;
}
}
/* Identify the pass here and print the each passes elements */
}
m=m/2;
}
3) Display the sorted as elements output
Subtopic -2 (Lecture):
Analyze the time complexity ofshell s o r t . Discuss what
10
disadvantages of insertion sort does the shell sortovercome. 4
[ Classic Data Structures 2Nd Ed. By Samanta,
SamantaDebasis]
05
Conclusion
11
SESSION NUMBER:05
Session Outcome: 1. Implement heap sort
2. Analyze time complexities of heap sort
Teaching– Activ
Time in BT L
Topic Learning e
Minutes
Method Lear
ning
Meth
ods
5 Introduction to Heap sorting
2
Sub-topic-1(lecture):
10 Explain Heap order property and two phases of 2
heap sort (1. Heap Creation 2. Sorting via deletion) QUIZ
with an example Lecturing,
Explain Max and Min Heap: Discussion
Heap Property: All nodes are either greater than or
equal to or less than or equal to each of its children. If
the parent nodes are greater than their child nodes, heap
is called a Max-Heap, and if the parent nodes are
smaller than their child nodes, heap is called Min-
Heap.
20 Practice session - 1: 3
Ask the students to write an algorithm to sort the
elements using heap sort technique and also analyze its
time complexity.
Analysis time Complexity of Heap Sort
Worst Case Time Complexity: O(n*log n)
Best Case Time Complexity: O(n*log n)
Average Time Complexity: O(n*log n)
Practice session - 2:
10 Suppose we are sorting an array of eight integers using
4
heapsort, and we have just finished some heapify (either
maxheapify or minheapify) operations. The array now
looks like this: 16 14 15 10 12 27 28 How many
heapify operations have been performed on root of
heap?
05 Conclusion
SESSION NUMBER:06
Session Outcome: 1. Understand the concept and Implementation of Merge sort
2. Analyze the divide and conquer principle
Teaching– Active
Time in BT
Topic Learning Learning
Minutes L
Method Methods
5 Introduction to Merge sorting
2
12
Sub-topic-1(lecture):
10 Explain Merge sort and its basics with an example
2
QUIZ
Lecturing,
Discussion
20 Practice session - 1: 2
Here is an array of ten integers:
5 3 8 9 1 7 0 2 6 4
Draw this array after the TWO recursive calls of merge sort are
completed, and before the final merge step has occurred.
Sub-topic-2(lecture):
10 Analyze the complexity of merge sort algorithm.
MergeSort(arr[], l, r) 3
If r > l
{1. Find the middle point to divide the array into two halves:
middle m = (l+r)/2
2. Call mergeSort for first half:
Call mergeSort(arr, l, m)
3. Call mergeSort for second half:
Call mergeSort(arr, m+1, r)
4. Merge the two halves sorted in step 2&3:
Call merge(arr, l, m, r)
05 Conclusion
13
SESSION NUMBER: 07
Session Outcome: 1. Analyse the time complexity of Quick sort algorithm for Best and worst cases.
quicksort(a,first,j-1);
quicksort(a,j+1,last);
}
}
https://www.geeksforgeeks.org/quick-sort/
05 Conclusion & Summary
SESSION NUMBER: 08
Session Outcome: 1. At the end of this session students will Understand the basic concept of Bucket Sort and it’s time
complexity.
14
Sub topic –3 (Lecture):
5 Analyze the complexity of bucket sort with suitable 4
example
5 Conclusion
SESSION NUMBER: 09
SessionOutcome:1. To implement external sorting.
2. To analyze the time complexity of externalsorting.
Time in Topic BT Teaching– Active
Minutes L Learning Learning
Method Methods
5 Recap / Introduction:
Sub-topic-1(lecture):
10 Explain External sorting and two phases of external sorting (1. 2
Sort phase 2. Merge phase) with an example.
Practice session - 1:
Ask the students to write an algorithm to sort the elements using
10 2
External sorting technique and also analyze its time
complexity.
Lecturing,
Practice Session(LTC):
Discussion
Ask the students to write and execute a C program to solve the
following example.
N = 14, M = 3 (14 records on tape Ta1, memory capacity: 3
20 records.) 3
T1: 17, 3, 29, 56, 24, 18, 4, 9, 10, 6, 45, 36, 11, 43
[Donald Knuth, The Art of Computer Programming, Volume 3:
Sorting and Searching, Second Edition. Addison-Wesley]
5 Conclusion
SESSION NUMBER: 10
Session Outcome: 1. Implement linear data structures like linked lists.
Teaching Active
Time in Topic
BTL Learning Learning
Minutes Method Methods
5 Lecture 2
Definition of ADT (Abstract Data Types), Type of ADT.
Ref: https://www.geeksforgeeks.org/abstract-data-types/
Lecture
Revise single linked list with diagram‘s
15 The list ADT 1
15
Mark Allen Weiss
For the following ADT- data structure create and display the
following structure members for ‗n‘ train information.
struct node
{
int train_no;
char train_name[20], source[20], destination[20];
float AC1_ fare, AC2_fare, AC3_fare, SL_fare, Gen_fare;
} t[20];
05 Conclusion
SESSION NUMBER: 11
Session outcome: 1. Implement linear data structures like linked lists.
Teaching Active
Time in Topic
BTL Learning Learning
Minutes Method Methods
5 Lecture 2 QUIZ
Definition of ADT (Abstract Data Types)
Lecture
Revise single linked list
20 The list ADT 1
Ref: chapter-3 of Data structures and algorithm analysis in C by
Mark Allen Weiss
Lecture Lecturing,
Suppose the Personnel file of a small company contain the Discussion
following data for all its employees SSN(social security
number),Name and salary. A Linked list is used to store the Ask 3
20 the students to write a function to sort the records based on SSN?
05 Conclusion
16
SESSION NUMBER: 11
Session outcome: 1. Insertion of nodes in DLL
Teaching– Active
Time in
Topic BTL Learning Learning
Minutes Method Methods
5 Recap and introduction to DLL
25 Lecture: 2
Explain insertion at begin, at middle and at end of DLL
Ref:https://www.tutorialspoint.com/data_structures_algorithm
s/pdf/doubly_linked_list_algorithm.pdf Just one-
Lecturing,
15 Lecture (subtopic) 2 minute paper
Discussion
Circular linked lists
Conclusion
05
SESSION NUMBER: 12
Session outcome: 1. To write delete () operation on DLL.
Teaching– Active
Time in
Topic BTL Learning Learning
Minutes Method Methods
5 Recap
30 Lecture: 2
Explain deletion at begin, at middle and delete at end operation of
DLL 3 Lecturing,
Ask the students to execute deletion at begin and end operation on Discussion
DLL
5 2
10 Ask the students to execute delete at middle on DLL 3
Conclusion
05
SESSION NUMBER: 13
Session outcome:1. Implement stack ADT through LinkedList
Teaching– Active
Time in
Topic BTL Learning Learning
Minutes Method Methods
5 Recap stack and ADT 1
Lecture Just one
20 2
Linked list implementation of stacks Lecturing, minute
Practice Session Discussion paper
20 Ask the students to write and execute a program to implement 3
stack ADT through Linked lists
5 Conclusion
SESSION NUMBER: 14
Session Outcome: 1. Write programs on stack using Linked List.
2. Solve real world practicalproblems.
Time in Topic BTL Teachin Active
Minutes g/Learni Learning
ng Methods
Method
05 Recap stack and its operations and Linked List 2
17
Practice session-1: Lecturing
20 Write a C program to implement Stacks using LinkedList. 3 ,
Practice session-2: Discussio
20 3 n
Write a C program to implement Queue using LinkedList
05 Conclusion and Summary.
Reference: https://www.geeksforgeeks.org/prefix-infix-
conversion/
15 Practice Session 2:
Ask the students to write a program for string reversal.
Example: Input : DataStructures 3
Output: serutcurtSataD
Reference: https://www.geeksforgeeks.org/stack-set-3-reverse-
string-using-stack/
05 Conclusion and Summary
SESSION NUMBER: 16
Session Outcome: 1. Convert an infix to postfix expression using stack.
Reference : http://cs.nyu.edu/courses/Fall12/CSCI-GA.1133-002
SESSION NUMBER: 17
Session Outcome: 1. Evaluate postfix expression using stack.
Reference :
http://cs.nyu.edu/courses/spring02/V22.0102-002/hw1.html
05 Conclusion and Summary
SESSION NUMBER: 18
Session Outcome: 1. To understand the application of queues
2. Able to solve Real-time problems using queues
Teaching – Active
Time in
Topic BTL Learning Learning
Minutes
Method Methods
Recap/Introduction:
5
Recall queue ADT
Practice session-1:
Use queue concept to implement the following to print 15 files.
In the situation where there are multiple users or a networked
computer system, you probably share a printer with other users.
15 When you request to print a file, your request is added to the print 2
queue. When your request reaches the front of the print queue, your
file is printed. This ensures that only one person at a time has
access to the printer and that this access shows the served user
leaves the queue first.
19
Practice session-2: One-
Use Queue data structure to print binary numbers from 1 to n. Lecturing, minute
1) Create an empty queue ofstrings Discussion Paper
2) Enqueue the first binary number ―1‖ toqueue.
3) Now run a loop for generating and printing n Binary
Numbers.
15 2
a) Dequeue and Print the front of queue.
b) Append―0‖attheendoffrontitemandenqueueit.
c) Append ―1‖ at the end of front item and enqueueit.
Input: n=5
Output: 1,10,11,100,101
10 Ask the students to execute practice session-2. 3
05 Conclusion and Summary
20
SESSION NUMBER: 19
Session Outcome: 1.Search, insert and removing elements in Btrees
Time Active
Teaching–
in Learning
Topic BTL Learning
Minute Methods
s Method
5 Introduction to Btrees
10 B Tree Rules 1
Sub topic -1 (Lecture):
10 2
Searching for an element in B Tree
Sub topic -2 (Lecture): Lecturing,
10 Inserting an element in B Trees 2 Discussion
5 Conclusion
SESSION NUMBER: 20
Session outcome: 1. Construct an Expression trees.
Teaching– Active
Time in
Topic BTL Learning Learning
Minutes
Method Methods
5 Recap previous topic
Sub-topic-1(lecture):
Explain Tree terminology, Binary Tree
10 1
[Data Structures and Algorithm Analysis in C, Mark Allen
Weiss, 4thchapter]
Practice session -1:
5 Ask the students to construct a binary tree for the given 3
elements 25,48,68,79,12,47,89,123.
Sub-topic -2:
Explain Expression Tree construction.
Practice session -2:
Ask the students to construct an expression tree for the following
10 expression(A+B)*((C-D)/(E^F)) could be represented thus 3
[E^F means E raised to the F power]:
[Data Structures and Algorithm Analysis in C, Mark Allen
Weiss, 4thchapter question] Lecturing,
10 Sub-topic-3(lecture): Discussion
Explain tree traversal techniques for an expression tree and 2
convert that intoexpression.
Practice Session-3:
Ask the students to convert given expression tree to an expression
5 3
5 Conclusion
21
SESSION NUMBER: 21
Session Outcome:
1. Implement operation on binary search tree(BST).
Time Topic BT Teaching– Active
in L Learning Learning
Minute Method Methods
s
15 Introduction and Terminology of trees
Sub topic – 1 (Lecture):
10 2
Explain the insert operation on a BST
Practical session-2: Lecturing,
Write function to perform the following operations on a BST: Discussion
1. Tree Traversals (Inorder, Preorder andPostorder)
25 2
2. Insert a node inBST
3. Finding the minimum and maximum in BST using
recursive and iterativeapproaches.
SESSION NUMBER: 22
Session Outcome:
2. Implement delete operation on binary search tree(BST).
3. Solve real world practicalproblems.
Time Topic BT Teaching– Active
in L Learning Learning
Minute Method Methods
s
5 Recap/Introduction:
Sub topic – 1 (Lecture):
Explain delete operation of Binary Search Tree (BST)in the
following cases:
10 2
1. Node to be removed has nochildren.
2. Node to be removed that has onechild.
3. Node to be removed that has twochildren.
Practical session-2:
Ask the students to write function in BST to perform the
following: Lecturing,
15 2 Discussion
4. Deleting a child (leave) node.
5. Deleting a sub tree node that has onechild.
6. Deleting a sub tree nodethat has two childrennode.
Practice session -2:
Ask the students to do the following:
1. Write the complete program which includes all the
15 2
operations insert, delete(child, sub tree) andtraversal
(preorder, inorder, postorder) of BST using structure and
pointer.
5 Conclusion
22
SESSION NUMBER: 23
Session Outcome: 1.Write search & insert operations on AVL Trees.
2.Construct an AVL Tree.
Time in Topic BT Teaching– Active
Minutes L Learning Learning
Method Methods
Recap:
5 Recap about previous topic
Sub-topic-1 (Lecture)
Explain AVL Tree and advantages of AVL Tree in the data
5 1
organization.
Reference: Data Structures by Mark Allen Weiss
Sub-topic-2 (Lecture)
What is a balancing factor? And its importance to improve the
10 efficiency of tree organization. Representing AVL tree as 1
balanced binary search tree. QUIZ
Reference: Data Structures by Mark Allen Weiss.
Practice session -1: Lecturing,
Create any 5 possible AVL trees with the following data and Discussion
10 Find out the balance factor of those trees. 2
13, 10, 7, 30, 15, 25, 36.
Reference: www.sanfoundary.com
Sub-topic-3 (Lecture)
Need for rebalancing the AVL Tree using Singlerotation.
Discussion of single left rotation and single rightrotation.
15 Construct an AVL tree with the following nodevalues: 3
13, 10, 7, 30, 35, 5, 3 and identify the single left rotations and
single right rotations
Reference :www.cprograms.com
5 Conclusion
SESSION NUMBER : 24
Session Outcome: 1. Construct an AVL Tree.
2.To develop different operations on AVL Tree.
Time in Topic BT Teaching– Active
Minutes L Learning Learning
Method Methods
5 Recap
Sub-topic – 1 (Lecture)
AVL tree ADT creation along with required function
10 1
prototypes.
Reference: Data Structures by Mark Allen Weiss
Practice Session-1
Implementation of AVL Double left rotation and AVL double
10 1
right rotation. Lecturing,
Reference: Data Structures by Mark Allen Weiss
Discussion
Sub-topic – 2 (Lecture)
Explanation of AVL Tree node search and node deletion
10 2
process.
Reference: Data Structures by Mark Allen Weiss
Practice Session-2
Execution of AVL tree data structure along with deletion,
10
search process.
Reference:www.sanfoundary.com
5 Conclusion
23
SESSION NUMBER : 25
SessionOutcome: 1. Construct SplayTree.
2. To develop Splay Tree.
Time in Topic BT Teaching– Active
Minutes L Learning Learning
Method Methods
Recap:
5 Recap about previous topic
Sub-topic-1 (Lecture)
20 Explain Splay Tree and its need in the data structures. 1
Reference: Data Structures by Mark Allen Weiss. Lecturing,
Practice session -1: Discussion
Construct Splay tree with the following node values:
18, 10, 5, 28, 13, 25, 42,3,56,2,68,1,90. And perform normal
25 3
splaying at nodes 1 and at node 90.
Identify the disadvantages.
Reference: Data Structures by Mark Allen Weiss.
SESSION NUMBER : 26
SessionOutcome: 1. Construct SplayTree.
2. To develop Splay Tree.
Time in Topic BT Teaching– Active
Minutes L Learning Learning
Method Methods
Recap:
5 Recap about previous topic
Sub-topic-1 (Lecture)
Explain selective splaying. zig-zig and zig-zag rotations and
20 2
how it overcomes normal splaying.
Reference: Data Structures by Mark Allen Weiss. Lecturing,
Practice session -1: Discussion
Create splay Tee with following keys with root 38.
25 1,32,3,4,8,65,42,34,81,9,32,56,54,38,66,77,44 3
apply splaying at node 54.
Reference: Data Structures by Mark Allen Weiss.
5 Conclusion
SESSION NUMBER: 27
SessionOutcome: 1. Construct red blackTree.
Time in Topic BT Teaching– Active
Minutes L Learning Learning
Method Methods
5 Recap/Introduction:
Sub topic – 1 (Lecture):
15 2
Explain Red Black tree and its properties
Sub topic – 2 (Lecture): Lecturing,
10 Explain Insert operation of Red Black tree(ReColoring) 2 Discussion
SESSION NUMBER: 28
SessionOutcome: 1. perform operations on red blackTree.
24
5 Recap/Introduction:
Sub topic – 1 (Lecture):
25 Explain insertion operation with following numbers into Red 2
Black tree 45,10,8,9,34,35,12,60,90
Lecturing, QUIZ
Practical session – 1:
10 Ask the students to insert the following numbers into Red 2 Discussion
Black tree 70,15,7,85,35
Practical session – 1:
10 Ask the students to insert the following numbers into Red 2
Black tree 49,39,51,29,7,89
SESSION NUMBER: 29
SessionOutcome: 1. Know about hash table and hashfunction.
2. Implement hash table by using different hashfunctions.
Time in Topic BT Teaching- Active
Minutes L Learning Learning
Method Methods
Recap:
5 Recap about previous topic
Sub-topic-1 (Lecture)
Hash table discussion:-
10 Explain about hash table and need of hash table in the data 2
structures.
Reference: Data Structures by Mark Allen Weiss
Sub-topic-2 (Lecture) Lecturing,
What is a hash table and hash function? And its need in Discussion
10 2
hashing the different values.
Reference: Data Structures by Mark Allen Weiss
Sub-topic – 3 (Lecture)
Explain different types of hash functions- 1) Division method,
10 2) Folding method, 3) Mid square method, 4) Random 2
Number Generator.
Reference:www.sanfoundary.com
Hash the student registered numbers into a hash table by
developing a hash function (Division method) for a section of
10 2
90 .
Reference: Developed by faculty
5 Conclusion
SESSION NUMBER: 30
Session Outcome: 1. Implement the concept of separate chaining
2.Resolve collisions using different collision resolution techniques.
Teaching– Active
Time(min) Topic BTL Learning Learning
Method Methods
5 Recap
Sub topic -1 (Lecture):
Explanation of separate chaining using hashing technique.
10 1
Initialization routine for separate chaining hash table.
Reference: Data structures by Mark Allen weiss
Practice session: Lecturing,
Ask the students to construct hash table using separate Discussion
chaining for the following elements of table size 15, design
5 1
your own hash function.
23,27,98,6,17,51,77,72,36,53.
Ask the students to implement initialization function.
Sub topic -2(Lecture): Explanation of Inserting and
10 2
searching an element into hash table using separatechaining.
25
Reference: Data structures by Mark Allen weiss
Practice session:
Ask the students to implement the following operations on
hash table.
20
1.insert()
2.search()
Reference: Data structures by Mark Allen weiss
SESSION NUMBER : 31
Session Outcome: 1.Resolve collisions using different collision resolution techniques.
2.Implement linear probing, quadratic probing, double hashing.
Timein Topic BTL Teaching– Active
Minutes Learning Learning
Method Methods
2 Recap
Reference:http://faculty.kfupm.edu.sa/ICS/saquib/ICS202/Unit3
Lecturing,
0_Hashing3.pdf.
Discussion
15 practice session-2 3
* Load the keys 23, 13, 21, 14, 7, 8, and 15, in this order,
in a hash table of size 7 using quadratic probing with c(i) =
±i2and the hash function: h(key) = key % 7.
Reference:http://www.eecs.yorku.ca/course_archive/2004-
05/W/2011N/Notes/hash_tables_2.pdf
*Implement double hashing to insert keys.
3 Summary &conclusion
SESSION NUMBER:32
Session Out Come: To implement priority queues and analyze their need in Data Structures.
Teaching– Active
Time in
Topic BTL Learning Learning
Minutes
Method Methods
Quiz
10 Explain the concept of Priority queues and their applications.
2 Lecturing,
Discussion
15 Practice Session 1
Consider a bank with one service counter. The persons will
26
stand in a queue. For example if customer 1 needs 30 mins to
finish and customer 2,3 needs only 2 mins each, servicing the
customer 1 and then 2,3 leads to unnecessary delay and
thereby the decreases the efficiency. 3
Eg: <C1,30>, <C2,5>, <C3,8>, <C4, 23> is the queue along
with service time of each customer. Now remove the one with
low service time. Do this until all the customers are serviced
and show the queue configuration at each instant.
SESSION NUMBER: 33
Session outcome: 1.Understand the representation of graphs.
2.Understand applications of graphs
Teaching– Active
Time in
Topic BTL Learning Learning
Minutes
Method Methods
5 Introduction
Explain Definitions of graph, vertices, edges, path, cycle,
20 2
DAG, undirected graph
Example applications of graphs such as the airport system,
Lecturing,
10 Traffic flow modeling etc.. 2
Discussion
Lecture:
10 2
Representation of graphs
05 Conclusion
SESSION NUMBER: 34
Session outcome: 1.Implement the topological sort in graph
Teaching– Active
Time in
Topic BTL Learning Learning
Minutes Method Methods
5 Recap
Lecture:
20 2
Explanation about topological sort by taking a cyclic graph
Practice session Lecturing,
Discussion
20 Ask the students to write pseudo code for topological sort 2
and also apply topological sort on given graph
05 Conclusion
SESSION NUMBER: 35
Session outcome: Find the shortest path from a given graph
Teaching– Active Learning
Time in
Topic BTL Learning Methods
Minutes
Method
5 Recap weighted graph
Lecturing,
Lecture:
20 2 Discussion
Explain single source shortest path problem
27
Lecture:
20 2
Explain unweighted shortest path with pseudo code
05 Conclusion
SESSION NUMBER: 36
Session outcome: Find shortest path using Dijkstra’s algorithm
Teaching– Active
Time in Minutes Topic BTL Learning Learning
Method Methods
5 Recap One minute
Lecture: paper
20 2
Explain algorithm with the help of pseudo code
Practice session Lecturing,
Discussion
20 Apply Dijkstra‘s algorithm on a directed weighted graph 3
to get shortestpath
05 Conclusion
SESSION NUMBER: 37
Session outcome: 1. Derive minimum spanning tree from a given graph
2. Use prim’s algorithm
Teaching– Active
BT
Time in Minutes Topic Learning Learning
L
Method Methods
5 Recap
Lecture:
20 Explain the Minimum spanning tree 1
Explain Prim‘s algorithm with the help of weighted graph
Practice session Lecturing,
Discussion
20 Apply Prim‘s algorithm on a weighted graph to get 2
minimum spanning tree
05 Conclusion
SESSION NUMBER: 38
Session outcome: 1.Understand the use and applications of minimum spanning tree.
2.Understand Kruskal’s minimum spanning tree algorithm
Teaching– Active
Time in Minutes Topic BTL Learning Learning
Method Methods
5 Recap
Explain what is spanning tree and minimum spanning
15 2
tree. Explain applications of minimum spanning tree
Explain about Krushkal‘s minimum spanning tree
algorithm and how it used to find minimum spanning Lecturing,
20 2
tree using diagrams. Discussion
28
PRACTICAL COMPONENT
List of Experiments supposed to finish in Open Lab Sessions:
Lab session List of CO-
Mappin
no Experiments g
Demonstration of time complexity using simple programs for O(n), CO5
1.
O(n2), O(log(n)) and write a program to search a number in an array of
n elements using Linear search and Binary search.
Develop a set of programs to implement below sorting techniques CO5
2.
(Divide and conquer method)
a. Quick sort – O(nlogn)
b. Merge sort– O(nlogn)
Applications of Stack CO5
3.
a. Infix to Postfix Conversion
b. Post fix expression Evaluation
Applications of Queue CO5
4.
a. Circular Queue
Double Linked List CO5
5.
a. Insert a node at any position
b. Reversed a doubly linked list
Circular Linked List CO5
6.
a. Circular-Single Linked List
b. Circular- Doubly Linked List
Applications of Single Linked list CO5
7.
a. Stack using Single Linked List.
b. Queue using Single Linked List
Binary search Tree CO5
8.
a. Creation of BST
b. Traversal – In-order, Pre-order, Post-order
c. Height of a BST
AVL Tree – Self Balancing Tree CO5
9.
Hashing -Separate chaining for collision handling CO5
10.
Implementation of Graphs CO5
11.
a. Breadth First Search
b. Depth First Search
c. Dijkstra‘s Algorithm
Minimum Spanning Tree CO5
12.
a. Prim‘s algorithm
b. Kruskal‘s algorithm
29
WEEKLY HOMEWORK ASSIGNMENTS/ PROBLEM SETS/OPEN ENDEDED PROBLEM-
SOLVING EXERCISES etc.
Week Assig Topic Details CO
nmen
t
3 A01 Sorting 1. Here is an array oftenintegers: 5 3 8 9 1 7 0 2 6 Exactly CO1
algorithms how many comparisons are required to sort these using insertion
sort? Show the values and the number of comparisons after each
iteration
2. Given an array e.g. 17, 23, 10, 1, 7, 16, 9, 3, 20, sort it on paper
using increment sequence 5, 3, 1. Write down explicitly eachstep.
3. Given an array of six elements: 15,19,10,7,17,16, sort it in an
ascending order using heap sort, show eachstep.
4. Here is an array which has just been partitioned by the first stepof
quicksort: 3, 0, 2, 4, 5, 8, 7, 6,9
Which of these elements could be the pivot?
5. Using the quick sort implementation determine the running timeof
quick sort for
a. sorted input
b. reverse-ordered input
c. randominput
6 A02 Stack, 1. Write a program for symbol balancing using a stack.Example: CO1
queue and {a*(b+c)/d}
list 2. Write a program to convert the following expression infix
expression into postfix expression(300+23)*(43-21)/(84+7).
3. Write a c program to implement Towers of Hanoi using ndiscs
4. A Customer Service hotline. A call comes in, there are not
enough operators to handle the call and it is placed in a queue.
The next call comes in and it is also placed in the queue. Then
when the next operator becomes available the first call that
entered the queue gets assigned to the availableoperator.
5. Compare stack withqueue?
9 A03 Binary 1.
search
trees
List out all leaf nodes, root, nodes with one child.
2.
Convert given expression tree into postfix expression
30
1. Construct an AVL tree with the node values as 10, 7, 25, 5, 8, 20,
50, 3, 15 and30.
3. Compare AVL and Splay trees along with complexities. Which one
is advantage andwhy?
11 A04 Hashing 1. A class teacher has student‘s data and their ranks in CO1. Hewishes CO3
and to prepare a seating plan for them according to their ranks. He does
priority this by placing the first ranker in last bench and second ranker in the
queues last before one position. Write a C program to perform this
accepting data of 10 and using structure to store student number
and rank as alist
2. The keys 12, 18, 13, 2, 3, 23, 5 and 15 are inserted into aninitially
empty hash table of length 10 using open addressing with hash
function h(k) = k mod 10 and linear probing. What is the resultant
hashtable
2. Hash the student saving account number (bank account) into ahash
table by using folding method for50
3. Assume that each letter is a key of a record and hash function is
computed for eachkey.
Hash:s I mp let as k
7 3 5 7 5 3 7 1 74
What would be the disposition of the keys using separate chaining in a
table of size7.
4. The size of hash table is 10 and uses quadratic probing to resolve
collisions. The key values are integers and hash function is used is
(4*key+3)%10.If the values 12,18,16,6,3,5,1 are inserted intohash
table.in which location 1 is inserted intotable.
13 A05 Graphs 1. You are given the schedule of all the cabs from the major points CO4
where the cab driver travels to and from. Write an algorithm to
figure out the least number of cab drivers he needs to take, in order
to go to all the places he wantsto?
2. Write Krushkal‘salgorithm?
3. Apply Dijkstra‘s algorithm on a directed weighted graph to get
shortestpath
31
COURSE TIME TABLE
Course Conduct
Theory Lecture 6 Sections | 72 Students each | Class 3 Lectures per week
Room | Course Coordinator
Practical 6 Sections | 72 Students each | 3 Batches | 1 P per week | each 2 hrs.
3 Instructors | 77 Computers 70 minutes Experiment |
30 minutes Evaluation for 25 students per
instructor
Hour 1 2 3 4 5 6 7 8
Day Component 7:20 - 8:15 - 9:05 9:40- 10:35- 11:35- 12:30- 1:30-2:20 2:20-3:10
8:10 10:30 11:25 12:25 1:20
REMEDIAL CLASSES:
Supplement course handout, which may perhaps include special lectures and discussions that would be
planned, and schedule notified accordingly.
32
SELF-LEARNING:
Assignments to promote self-learning, survey of contents from multiple sources.
EVALUATION PLAN:
33
ATTENDANCE POLICY
Every student is expected to be responsible for regularity of his/her attendance in class rooms and laboratories,
to appear in scheduled tests and examinations and fulfill all other tasks assigned to him/her in every course. For
Promotion, a Minimum of 50% of internal marks must be obtained. In every course, student has to maintain a
minimum of 85% attendance to be eligible for appearing in Semester end examination of the course, for cases of
medical issues and other unavoidable circumstances the will be condoned if their attendance is between 75% to
85% in every course, subjected to submission of medical certificates, medical case file and other needful
documental proof to the concerned departments.
DETENTION POLICY
In any course, a student has to maintain a minimum of 85% attendance and must secure a minimum of 50%
marks in In-Semester Examinations to be eligible for appearing to the Semester End Examination, failing to
fulfill these conditions will deem such student to have been detained in that course.
PLAGIARISM POLICY
Use of unfair means in any of the evaluation components will be dealt with strictly, and the case will be
reported to the examination committee.
Chamber
Chamber Chamber
Consultation Signature of
S.No. Name of Faculty Consultation Consultation
Timings for each Course faculty
Day (s) Room No:
day
1 Dr.D.Haritha All Days 2:00P.M to 3: 20P.M F210
C205
6 S.Siva kumar All Days 2:00P.M to 3: 20P.M
F206
7 N.Sreeram All Days 2:00P.M to 3: 20P.M
F202
8 Dr.SK.Razia All Days 2:00P.M to 3: 20P.M (Cabin)
F206
9 ASLG Gupta All Days 2:00P.M to 3: 20P.M
F206
10 M.Anila All Days 2:00P.M to 3: 20P.M
F206
11 Krimunisha All Days 2:00P.M to 3: 20P.M
F202
12 Dr.M.Anusha All Days 2:00P.M to 3: 20P.M (Cabin)
F206
13 S.Pradeep Raj All Days 2:00P.M to 3: 20P.M
F206
14 D.Anand All Days 2:00P.M to 3: 20P.M
34
F206
15 G.Saisudha All Days 2:00P.M to 3: 20P.M
C205
16 G.Chandrasekhar All Days 2:00P.M to 3: 20P.M
C205
17 A.Krishna All Days 2:00P.M to 3: 20P.M
F206
18 S.Harika All Days 2:00P.M to 3: 20P.M
C205
19 CH.Naresh All Days 2:00P.M to 3: 20P.M
F206
20 G.K.Chakravarthi All Days 2:00P.M to 3: 20P.M
F206
21 Gayatri All Days 2:00P.M to 3: 20P.M
F206
22 P.Neelakanteswara All Days 2:00P.M to 3: 20P.M
F206
Y.Ayyapa All Days 2:00P.M to 3: 20P.M
23
F206
24
V.Udaykumar All Days 2:00P.M to 3: 20P.M
F206
25 E.Sridevi All Days 2:00P.M to 3: 20P.M
F206
26 G.Rama Krishna All Days 2:00P.M to 3: 20P.M
F206
27 V.L.Sarvani All Days 2:00P.M to 3: 20P.M
C205
28 A.Srinivasrao All Days 2:00P.M to 3: 20P.M
F206
29 ZeelanBasha All Days 2:00P.M to 3: 20P.M
F206
30 T.Ganeshan All Days 2:00P.M to 3: 20P.M
F206
31 V.Premalatha All Days 2:00P.M to 3: 20P.M
F206
32 E.Rajeshkumar All Days 2:00P.M to 3: 20P.M
F206
33 B.Ashok All Days 2:00P.M to 3: 20P.M
F206
34 T.Yamini All Days 2:00P.M to 3: 20P.M
F206
35 M.Ramkumar All Days 2:00P.M to 3: 20P.M
C205
36 Shilpa Itnal All Days 2:00P.M to 3: 20P.M
J.Nagaraju C205
37 All Days 2:00P.M to 3: 20P.M
C205
38 Hima Bindhu All Days 2:00P.M to 3: 20P.M
35
F206
39 D.Ragav Lavanya All Days 2:00P.M to 3: 20P.M
GENERAL INSTRUCTIONS
Students should come to college with prepared course handout for classes and carry the text book(s) or
material(s) as prescribed by the Course Faculty to the class.
NOTICES
Most of the notices are available on the LMS platform.
All notices will be communicated through the institution email.
All notices concerning the course will be displayed on the respective Notice Boards.
36