Sunteți pe pagina 1din 36

K L Deemed to be University

Department of Computer Science & Engineering


Course Handout
A.Y.2019-20, Even Semester

Course Title : DATA STRUCTURES


Course Code : 19SC1202
L-T-P-S Structure : 3-0-2-3
Credits :4
Pre-requisite : PSCP
Course Coordinator :Mr.T.Rajesh Kumar
Team of Instructors:

1. Dr. D.Haritha 21. Mr.B.Ashok


2. Dr. P.Siva Kumar 22. Mrs.SaiSudha
3. Dr. S.Siva Kumar 23. Mr.M.RamKumar
4. Dr. Sk.Razia 24. Mr.G.Chandra Sekhar
5. Ms.E. SreeDevi 25. Mrs.P.Gayatri
6. Mr.N V SPavanKumar 26. Mr.Y.Ayyappa
7. Mr.CMAkZeelan Basha 27. Mr.S.Siva Kumar
8. Mr.N.SreeRam 28. Mrs.S.Harika
9. MrV.UdayKumar 29. Dr.NaveenKumar
10. MrD.Anand 30. Ms.T.Yamini
11. Ms.V.Premalatha 31. Dr.M.Anusha
12. Mr.A.Krishna 32. Ms.M.Anila
13. Mr.PradeepRaj Savarapu 33. Mr.GK.Chakravarthi
14. Mr.ASALGGopalGupta 34. Mr. P.Neelakanteswar
15. Mr.E.RajeshKumar 35. Ms.Shilpa Itnal
16. Mr.G.RamaKrishnaSrinivas 36. Mr.Ch. Naresh
17. Mrs.Karimunnisa 37. Mr. J.Nagaraju
18. Mrs.V.lakshmiSarvani 38. Ms. Hima Bindu
19. Mr.T.Ganesan 39. Ms. D.R.Lavanya
20. Mr.A.Srinivasa Rao

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:

CO# CO Description PO/PSO BTL


(1 to6)
CO1 Apply measures of efficiency on algorithms and PO1, PO2, 4
Analyze different Sorting Algorithms. PSO1,PSO2
CO2 Analyze and compare stack ADT and queue ADT PO1, PO4, 4
implementations using linked list and applications. PSO1,PSO2
CO3 Analyze the linked implementation of Binary, Balanced PO1, PO4, 4
Trees and different Hashing techniques. PSO1,PSO2
CO4 Analyze different representations, traversals, PO2, PO4, 4
applications of Graphs and Heap organization. PSO1,PSO2
CO5 Develop and Evaluate common practical applications PO1, PO2, 5
for linear and non linear data structures. PSO1,PSO2

COURSE OUTCOME INDICATORS (COIs):


Course
Highest COI-1 COI-2 COI-3 COI-4 COI-5
Outco
BTL (BTL1) (BTL2) (BTL3) (BTL4) (BTL5)
me No.
Apply the
Explain the sorting
insertion sort, algorithms
A lower bound (insertion sort,
Compare the
Define the for simple A lower bound
time
mathematical sorting for simple
complexity and
background, algorithm, sorting
CO 1 4 space
model and shell sort, algorithm,
complexity of
running time merge sort, shell sort,
sorting
calculations Quick sort, merge sort,
algorithms.
bucket sort and Quick sort,
external sort bucket sortand
algorithms external sort)
for givendata
Discuss the
list-based
implementatio
n n and array-
Illustrate the Differentiate
Define the stack, based
applications of the stack ADT,
CO 2 4 queue and list implementatio
stack queue queue ADT
ADTs. n n of stack
and lists and lists
and queue and
operations of
stack, queue
and list ADT
Define the Analyzethe
Explain the
properties of complexity of
hash function, Use the
trees, hashing search, insert
separate hashing
and enumerate and delete
chaining, Hash techniques to
CO 3 4 the type of the operations of
table, store and
trees (Binary Binary Trees,
rehashing and organize the
Trees, Binary Binary search
extensible data
search trees, trees, AVL
hashing
AVL trees,splay trees, splay

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)

1) An ability to apply knowledge of mathematics, science, engineering fundamentals and an


engineering specialization for the solution of complex engineeringproblems
2) An ability to identify, formulate, research literature, analyze complex engineering problems in
mechanical engineering using first principles of mathematics, natural sciences and
engineeringsciences
3) An ability to design solutions for complex engineering problems and system component or
processes that meet the specified needs considering public health & safety and cultural,
societal &environment
4) An ability to use research-based knowledge and research methods including design of
experiments, analysis and interpretation of data and synthesis of the information to provide
validconclusions.
5) Ability to create, select and apply appropriate techniques, resources and modern engineering
activities, with an understanding of thelimitations
6) Ability to apply reasoning informed by the contextual knowledge to assess societal, health,
safety, legal and cultural issues and the consequent responsibilities relevant to the
professional engineeringpractice
7) Ability to demonstrate the knowledge of engineering solutions, contemporary issues
understanding their impacts on societal and environmental contexts, leading towards
sustainabledevelopment

Syllabus:

Algorithm Analysis: Mathematical Background, Model, Analyze, Running Time


Calculations, Lists. Stacks and Queues: Abstract Data Types (ADTs), The List ADT, The
Stack ADT, The Queue ADT. Trees: Preliminaries, Binary Trees, The Search Tree ADT—
Binary Search Trees, AVL Trees, Splay Trees, Tree Traversals (Revisited), B-Trees, Red black
trees. Hashing: General Idea, Hash Function, Separate Chaining, Hash Tables without Linked
Lists, Rehashing, Hash Tables in the Standard Library, Extendible Hashing. Priority Queues
(Heaps): Model, Simple Implementations, Binary Heap, Applications of Priority Queues.
Sorting: Preliminaries, Insertion Sort, A Lower Bound for Simple Sorting Algorithms, Shell
sort, Heap sort, Merge sort, Quick sort, Indirect Sorting, A General Lower Bound for Sorting,
Bucket Sort, External Sorting. Graph Algorithms: Definitions, Topological Sort, Shortest-
Path Algorithms, Minimum SpanningTree.
3
Text Books:
1. Mark Allen Weiss, Data Structures and Algorithm Analysis in C, 2010 , Second
Edition, PearsonEducation.
2. Ellis Horowitz, Fundamentals of Data Structures in C: Second Edition, 2015

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

T BOOK [1], Semester in


CH 7.6 Exam-I
Page no 246- Lecturing,
7 1 4 Analysis of merge sort Discussion
250

T BOOK [1], Semester in


CH 7.7 Exam-I
Page no 251- Lecturing,
8 1 4 Quick sort and its analysis Discussion
261

T BOOK [1], Semester in


CH 7.10 Lecturing, Exam-I
9 1 3 Bucket sort Page no 266 Discussion

T BOOK [1], Lecturing, Semester in


10 1 3 External sort CH 7.11 Discussion

5
Book No[CH Teaching-
Sess. Evaluation
CO COI Topic (s) No][Page No] Learning
No. Components
Methods
Page no 266- Exam-I
271

T BOOK [1], Semester in


CH 3.2 Lecturing, Exam-I
11 2 2 Single linked list Page no 58-66 Discussion

T BOOK [1], Semester in


CH 3.2 Lecturing, Exam-I
12 2 2 Doubly linked list Page no 67-68 Discussion

T BOOK [1], Semester in


CH 3.3 Lecturing, Exam-I
13 2 2 Stack ADT through LinkedList Page no 78-86 Discussion

T BOOK [1], Semester in


Applications of Stack String Reversal CH 3.3 Lecturing, Exam-I
14 2 3 Page no 87-95 Discussion

T BOOK [1], Semester in


Applications of Stack Balancing CH 3.3 Lecturing, Exam-I
15 2 3 parenthesis Page no 87-95 Discussion

T BOOK [1], Semester in


CH 3.3 Lecturing, Exam-I
16 2 3 Convert infix to post fix expression
Page no 87-95 Discussion

T BOOK [1], Semester in


Applications of Stack evaluation of postfix CH 3.3 Lecturing, Exam-I
17 2 3 expression Page no 87-95 Discussion

T BOOK [1], Semester in


CH 3.4 Exam-I
Page no 95- Lecturing,
18 2 2 Queue ADT, Application of Queue Discussion
100

Semester in
Lecturing,
19 Revision Discussion Exam-I

T BOOK [1], Semester in


B Trees, searching, insertion, and Chapter 4.2 Lecturing, Exam-II
20 3 2 Pages 111- Discussion
deletion
112
T BOOK [1], Semester in
Chapter Exam-II
4.2.2 Lecturing,
21 3 2 Expression trees Pages 113- Discussion
115

T BOOK [1], Semester in


Binary search trees, Construction Chapter 4.3 Lecturing, Exam-II
22 3 2 Pages 116- Discussion
of AVLtrees
123

6
Book No[CH Teaching-
Sess. Evaluation
CO COI Topic (s) No][Page No] Learning
No. Components
Methods

T BOOK [1], Semester in


Chapter 4.3 Exam-II
Lecturing,
23 3 3 Insert and delete operations on BST Pages 116- Discussion
123

T BOOK [1], Semester in


Chapter 4.4 Lecturing, Exam-II
24 3 3 Operations on AVL trees Pages 126- Discussion
138
T BOOK [1], Semester in
Chapter4.5 Lecturing, Exam-II
25 3 2 Splay trees Pages 139- Discussion
147
T BOOK [1], Semester in
Chapter4.5 Lecturing, Exam-II
26 3 2 Splay tree operations Pages 139- Discussion
147
Semester in
Lecturing,
27 3 2 Construction of red black trees W.Ref [5] Discussion Exam-II

Semester in
Lecturing,
28 3 2 Implementation of red black trees W.Ref [5] Discussion Exam-II

T BOOK [1], Semester in


Chapter 5.2 Lecturing, Exam-II
29 4 2 Hash table and hash function Pages 165- Discussion
167
T BOOK [1], Semester in
Chapter 5.3 Exam-II
Lecturing,
30 4 2 Separate chaining Pages 168-
Discussion
172

T BOOK [1], Semester in


Chapter 5.4 Exam-II
Lecturing,
31 4 2 Open addressing Pages 173-
Discussion
180

T BOOK [1], Semester in


Chapter 6 Lecturing, Exam-II
32 4 2 Priority queues Pages 193- Discussion
205
T BOOK [1], Semester in
Chapter 9.1 Lecturing, Exam-II
33 4 2 Graph and its traversals Pages 299- Discussion
301
T BOOK [1], Semester in
Lecturing,
34 4 2 Topological sort Chapter 9.2 Exam-II
Discussion
Pages 302-

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.

Time in Teaching– Active


Topic Learning
Minute BTL Learning
s Method Methods
Lecture-1
Mathematical Background
Definitions of Asymptotic notations - O(n), Ω(n) and Ɵ(n) – Best, Average and
30 1
Worst Case
Ref: chapter-2 of Data structures and algorithm analysis in C by Mark Allen
Weiss
Lecture-2:
Deliver a mathematical calculation of running time of sample algorithm and ask
the students to analyze it.
Algorithm: Time taken
1) Start ------ 0
2) Input: Read ‗n‘ ------ 1
3) initialize: sum=0, i=1 ------ 2 Lecturing,
4) Process: sum = sum + i ------ n Discussion
5) i = i +1 ------ n
15 1
6) if ( i < = n ) go to step 4 ------ n +1
7) Output:
8) print ‗sum‘ ------ 1
9) Stop ------ 0
Total time in function f(n) = 3n + 4

Ref: chapter-2 of Data structures and algorithm analysis in C by Mark Allen


Weiss

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

Ask the students to find the running time of Following problems.


Lecturing,
30 I) Problem 2 Discussion
For( i=0; i < n-1 ; i++)
Printf(―%d‖, i+75);

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‖);
}

Ref: chapter-2 of Data structures and algorithm analysis in C by Mark Allen


Weiss
Lecture-2
Logarithms in Running time and checking analysis. Ask the students to
perform binary search algorithm and analyze the time complexity.
15 2
Discuss the O (1), O (log n), O (n/2), O (n), O (n2), O (n3) . . .
Ref: chapter-2 of Data structures and algorithm analysis in C by Mark Allen
Weiss
05 Conclusion

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--;
}

3) Display sorted array as output


Practice session -2:
10 Bangalore City, where peace prevails most of the time. Not 3
everyone is a huge fan of peace, though. Certainly not Mr. XYZ,
10
whose identity is not known to us - yet. Mr. XYZ has somehow
managed to bring zombies to Bangalore City to attack and
destroy the city.If he sees a zombie , he marks them in his list
with their power. After generating the entire list of power of these
creatures, he decides to arrange this data.All the zombies arranged
in ascending sorted manner of their power.
The powers are given as:2, 3, 10, 12, 15, 22, 21, 13, 18, 21, 17.
Implement Insertion sort program to arrange the powers in
ascending order.
5 Conclusion

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.

[Data Structures and Other Objects Using C++ by Michael


Main and Walter Savitch]

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.

Time in Topic BT Teaching– Active


Minutes L Learning Learning
Method Methods
05 Recap / Introduction
05 Sub-topic 1(Lecture):
2
Explain Quick sort algorithm with best case derivation.
15 Practice session 1:
Ask the students to sort the following data using quick sort:
4
99,22,66,11,55,33, 44,88, 77, 29, 67, 54, 90 and then analyse the
Best case for Quick sort
05 Sub-topic 2 (Lecture):
2
Explain Quick sort algorithm with worst case derivation.
15 Practice session 2: (LTC)
Ask the Students to analyze the following code for quick sort
using the system :
void quicksort(int a[10], int first, int last)
{
int pivot,j,t,i;
if(first<last) Lecturing,
{ Discussion
pivot=first; i=first; j=last;
while(i<j)
{
while(a[i] <= a[pivot]) i++; 4
while(a[j]>a[pivot]) j--;
if(i<j) { t=a[i]; a[i]=a[j]; a[j]=t; }
}
t=a[pivot]; a[pivot]=a[j]; a[j]=t;

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.

Time in Topic BTL Teaching– Active


Minutes Learning Learning
Method Methods
Recap/Introduction:
5
Sub topic – 1 (Lecture):
15 Explain the data partitioning strategies using the 2
example of the bucket sort. Lecturing,
Practical session – 1: Discussion
Ask the students to sort the following data using
20 bucket sort : 3
80, 50, 30, 10, 90, 60, 0, 70, 40, 20, 50
Analyse the following algorithm for 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

Ref: chapter-3 of Data structures and algorithm analysis in C by

15
Mark Allen Weiss

Practice Session 1: Lecturing,


Discussion
Suppose the Personnel file of a small company contain the
following data for all its employees SSN(social security 3
25 number),Name and salary. A Linked list is used to store the Ask
the students to write a function to sort the records based on SSN?

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];

Ref : ―Data Structures ―by Forozan

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?

//Referred from ―Data Structures ―by Forozan

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.

SESSION NUMBER :15


Session Outcome: Convert an infix expression into its postfix equivalent.
1. StringReversal
2. BalancedParenthesis

Time in Topic BTL Teaching– Active


Minutes Learning Learning
Method Methods
5 Recap
10 Lecture: 2
Lecturing,
Explain how to convert an infix expression to postfix using
Discussion
stacks
15 Practice Session 1: 3
Ask the students to write program for an infix
expression: ((A-(B/C))*((K/L)-U)) Suppose that we are
using the usual Stack concept to convert the expression from
infix to postfix notation. What is the maximum number of
symbols that will appear on the stack at one time during the
conversion of thisexpression?

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.

Time in Topic BTL Teaching



Minutes
Learning
Method
5 Recap of stack
20 Lecture: 1 Chalk
Explain how to convert an infix expression to postfix using stacks and
talk,
ppt
20 Practice Session 1: 2

Write a program to convert an infix expression to postfix expression: (a*(b+


c))+ (b/d)*a . Suppose that we are using the usual Stack concept to convert the
expression from infix to postfix notation. What is the maximum number of
symbols that will appear on the stack at one time during the conversion of this
expression?

Reference : http://cs.nyu.edu/courses/Fall12/CSCI-GA.1133-002

05 Conclusion and Summary


18
Home Assignment:

1. Write a program to convert the following expression infix expression


into postfix expression(300+23)*(43-21)/(84+7).

SESSION NUMBER: 17
Session Outcome: 1. Evaluate postfix expression using stack.

Time in Topic BTL Teaching– Active


Minutes Learning Learning
Method Methods
5 Recap Lecturing,
15 Explain the evaluation of postfix expression using stack 2 Discussion
10 Practice Session 1: 2
Ask the students to write a program for evaluating the following
postfix expression using stack 1 2 3 * + 4 –
Reference :
http://scriptasylum.com/
15 Practice Session 2:
Write a program to implement a calculator. The calculator will
take an infix expression convert it to a postfix expression and
then evaluate it. The infix expression will consist of operands
that are single digits and the operators {+,-,*,/}.
An example of such an expression is 2+3*4/6. This will 3
translate to 234*6/+ and will then be evaluated as 4.0. Your
program must evaluate infix expressions containing
parentheses such as (2+4)*(8-2)/(11-9).

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

Sub topic -3 (Lecture):


10 Removing an element from B trees 2

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

Sub topic – 2 (Lecture):


20 Explain Insert operation of Red Black tree(Rotation) 2

SESSION NUMBER: 28
SessionOutcome: 1. perform operations on red blackTree.

Time in Topic BT Teaching– Active


Minutes L Learning Learning
Method Methods

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

10 Sub topic -1 (Lecture): 1


Explanation of Open Addressing and different types of
strategies to resolve Collision.
Explanation of Linear probing and its implementation.
Reference: Data structures by Mark Allen Weiss
5 Practice session-1 3
*Ask the students to insert keys {18,89,49,58,69} in to hash
table.

Reference :Data Structures by Mark Allen Weiss.


15 Sub topic -2 (Lecture): 2
Explanation of Quadratic probing and Double Hashing.

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.

* Consider a hashtable storing integer keys that handles


collision with double hashing–N= 13–h(k) =k mod 13–d(k)
=7 -k
mod 7
Insert keys 18, 41, 22, 44, 59, 32, 31, 73, in this order

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.

Subtopic 1-Types of priority queues


1. Ascending PQ-Element with least priority removed first
2.Descending PQ- Element with highest priority removed
20 first. 1
Subtopic 2-Operations on Priority Queue
1. Creation
2. Insertion
3. Deletion
4. Display
5 Conclusion

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

Ask the students to analyze the time complexity of


5 4
Krushkal‘s algorithm.
05 Conclusion

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.

2. Insert 1, 32 and 31 nodes in the following tree. After that delete


node 7 from thetree.
Insert 55 into above AVL tree and delete 15 from the constructed AVL tree.

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

Mon Theory S36, S37, S36, S37,


S8, S9 S8, S9
S38 S38

Lab S21 S11, S31 S34, S5 S19, S38

Tue Theory S11,


S12,
S27, S28,
S27, S18, S19, S18, S19,
S30, S31, S7, S8
S28, S20 S20
S32
S30,
S31,S32

Lab S22 S32, S12 S6, S33 S40, S20

Wed Theory S1, S2,


S1, S2, S3,
S3, S13,
S13, S14, S4, S5, S4, S5,
S14,
S15, S16, S6 S6, S9
S15,
S17
S16,S17

Lab S9 S3 S13, S25 S17

Thu Theory S4, S5, S21, S22, S21, S22,


S2, S2, S3,
S6, S33, S23, S39, S23, S39,
S33, S34
S34 S40 S40

Lab S30 S4 S14, S26 S18, S36

Fri Theory S27,


S28, S36, S37, S33, S34, S24, S25, S21, S22,
S30, S38 S39 S26 S23
S31,S32

Lab S30 S4 S14, S26 S18, S36

Sat Theory S13,


S14, S24, S25, S18, S19, S15, S16,
S24, S26 S20 S17
S25,S26

Lab S1 S23 S27, S7 S15, S37

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.

S.No Topics CO ALM References/MOOCS

EVALUATION PLAN:

Evaluation Evaluation Assessment Duration


Weightage/Marks CO1 CO2 CO3 CO4 CO5
Type Component Dates (Hours)

Blooms Taxonomy Level


Weightage 10 Test 1 Dates 4.2 4.2 1.8
Sem-In 11-02-2019
Max 2
Exam-I 50M to 21 21 8
Marks 13-02-2019
In-Semester Weightage 10 Test 2 Dates 4.2 4.2 1.8
Summative Sem-In 08-04-2012
Evaluation Max 2
Exam -II 50M To 21 21 8
Total = 28 Marks 10-04-2019
%
Weightage 8 Lab Sem-In 2 2 2 2
Lab Sem-In
Exam 1½
Exam Max
40M Dates 10 10 10 10
Marks
Weightage 8 2 2 2 2
ALMs Max Continuous Evaluation
120M 30 30 30 30
Marks
Home Weightage 3+2 1.25 1.25 1.25 1.25
Assignment Max Continuous Evaluation
Formative +Textbook 40M 10 10 10 10
Marks
Evaluation
Total = 32 Lab Weightage 14 3.5 3.5 3.5 3.5
% Continuous Max Continuous evaluation
Evaluation 240M 60 60 60 60
Marks
Weightage 5
Attendance Continuous evaluation
Max
5M
Marks
Lab
Weightage 12+4 3.2 3.2 3.2 3.2 3.2
SE Lab External

End- Exam. Max
40M Dates 8 8 8 8 8
Semester Marks
Summative End Sem
Evaluation Weightage 24 Exam 4.8 4.8 4.8 4.8 4.8
Total = 40 Semester Dates
3 hrs
% End Exam 29-04-2019
Max
100M To 20 20 20 20 20
Marks
11-05-2019

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.

COURSE TEAM MEMBERS, CHAMBER CONSULTATION HOURS AND CHAMBER


VENUE DETAILS:
Each instructor will specify his / her chamber consultation hours during which the student can contact him / her in
his / her chamber for consultation.

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

2 Dr.S.Siva kumar All Days 2:00P.M to 3: 20P.M F206


F206
3 N.V.S.Pavan Kumar All Days 2:00P.M to 3: 20P.M
F206
4 Dr.P.Siva Kumar All Days 2:00P.M to 3: 20P.M
C205
5 Dr.Naveen kumar All Days 2:00P.M to 3: 20P.M

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.

Signature of COURSE COORDINATOR:

Signature of Department Prof. In-charge Academics & Vetting Team Member:

HEADOFDEPARTMENT: Approval from:DEAN-ACADEMICS


(Sign with Office Seal)

36

S-ar putea să vă placă și