Data Structure Course
Data Structure Course
COURSE FILE
ON
DATA STRUCTURES
II B.Tech I-SEMESTER
A.Y.: 2022-2023
Prepared by
Mrs.D.Rajeshwari
Assistant Professor
R18 B.TECH CSE III YEAR
Mission:
IM1: To offer outcome-based education and enhancement of technical and practical skills.
collaboration..
IM4: To create an enterprising environment to ensure culture, ethics and social responsibility
Mission:
DM1 : To provide ambience that enhances innovations, problem solving skills, leadership
qualities, decision making, team-spirit and ethical responsibilities.
DM2 : To impart quality education with professional and personal ethics, so as to meet the
challenging technological needs of the industry and society.
DM3 : To provide academic infrastructure and develop linkage with the world class
organizations to strengthen industry-academia relationships for learners.
DM4 : To provide and strengthen new concepts of research in the thrust area of Computer
Science and Engineering to reach the needs of Government and Society.
R18 B.TECH CSE III YEAR
PEO1: To develop trained graduates with strong academic and technical skills of modern
computer science and engineering.
PEO2: To promote trained graduates with leadership qualities and the ability to solve
real time problems using current techniques and tools in interdisciplinary
environment.
PEO3: To motivate the graduates towards lifelong learning through continuing education
and professional development.
II YEAR I SEMESTER
Course
S.No. CourseTitle L T P Credits
Code
1 CS301ES AnalogandDigitalElectronics 3 0 0 3
2 CS302PC DataStructures 3 1 0 4
3 MA303BS ComputerOrientedStatisticalMethods 3 1 0 4
4 CS304PC ComputerOrganizationandArchitecture 3 0 0 3
5 CS305PC ObjectOrientedProgrammingusingC++ 2 0 0 2
6 CS306ES AnalogandDigitalElectronicsLab 0 0 2 1
7 CS307PC DataStructuresLab 0 0 3 1.5
8 CS308PC ITWorkshopLab 0 0 3 1.5
9 CS309PC C++ProgrammingLab 0 0 2 1
10 *MC309 GenderSensitizationLab 0 0 2 0
TotalCredits 14 2 12 21
II YEAR II SEMESTER
Course
S.No. CourseTitle L T P Credits
Code
1 CS401PC DiscreteMathematics 3 0 0 3
2 SM402MS BusinessEconomics&FinancialAnalysis 3 0 0 3
3 CS403PC OperatingSystems 3 0 0 3
4 CS404PC DatabaseManagementSystems 3 1 0 4
5 CS405PC JavaProgramming 3 1 0 4
6 CS406PC OperatingSystemsLab 0 0 3 1.5
7 CS407PC DatabaseManagementSystemsLab 0 0 3 1.5
8 CS408PC JavaProgrammingLab 0 0 2 1
9 *MC409 ConstitutionofIndia 3 0 0 0
TotalCredits 18 2 8 21
CS302ES:DATASTRUCTURES
CourseObjectives:
• Exploringbasicdatastructuressuchasstacksandqueues.
• Introducesavarietyofdatastructuressuchashashtables,searchtrees,tries,heaps,graphs.
• Introducessortingandpatternmatchingalgorithms
CourseOutcomes:
• Abilitytoselectthedatastructuresthatefficientlymodeltheinformationinaproblem.
• Abilitytoassessefficiencytrade-offsamongdifferentdatastructureimplementationsor
combinations.
• Implementandknowtheapplicationofalgorithmsforsortingandpatternmatching.
• Designprogramsusingavarietyof datastructures,includinghashtables, binaryandgeneral tree
structures, search trees, tries, heaps, graphs, and AVL-trees.
UNIT-I
Introduction to Data Structures, abstract data types, Linear list – singly linked list implementation,
insertion, deletion and searching operations on linear list, Stacks-Operations, array and linked
representations of stacks, stack applications, Queues-operations, array and linked representations.
UNIT-II
Dictionaries: linear list representation, skip list representation, operations - insertion, deletion and
searching.
HashTableRepresentation:hashfunctions,collisionresolution-separatechaining,openaddressing-
linear probing, quadratic probing, double hashing, rehashing, extendible hashing.
UNIT-III
SearchTrees:BinarySearchTrees, Definition, Implementation,Operations- Searching, Insertionand
Deletion,AVLTrees,Definition,HeightofanAVLTree,Operations–Insertion,DeletionandSearching, Red –
Black, Splay Trees.
UNIT-IV
Graphs:GraphImplementationMethods.GraphTraversalMethods.
Sorting:HeapSort,ExternalSorting-Modelforexternalsorting,MergeSort.
UNIT-V
Pattern Matching and Tries: Pattern matching algorithms-Brute force, the Boyer –Moore algorithm,
the Knuth-Morris-Pratt algorithm, Standard Tries, Compressed Tries, Suffix tries.
TEXTBOOKS:
1. Fundamentalsof DataStructuresinC,2ndEdition,E.Horowitz,S.SahniandSusanAnderson Freed,
Universities Press.
2. Data Structuresusing C –A.S.Tanenbaum,Y. Langsam, andM.J.Augenstein, PHI/Pearson
Education.
REFERENCEBOOK:
1. DataStructures:AP seudocodeApproachwithC,2ndEdition,R.F.GilbergandB.A.Forouzan,
Cengage Learning.
SRI INDU INSTITUTE OF ENGINEERING AND TECHNOLOGY
Accredited by NAAC with A+ Grade, Recognized under 2(f) of UGC Act 1956
(Approved by AICTE, New Delhi and Affiliated to JNTUH, Hyderabad)
Khalsa Ibrahimpatnam, Sheriguda (V), Ibrahimpatnam (M), Ranga Reddy Dist., Telangana – 501 510
Website: https://siiet.ac.in/
COURSE OUTCOMES
C212.1 Ability to decide on the data structures like stack, queues and list representation
for Real Time Systems. (Application)
C212.2 Design the programs using a variety of Data Structures such as List and Hashing
Representation. (Synthesis)
C212.3 Analyze and implement the various kinds of data structures in the trees.
(Analysis)
C212.4 To illustrate the structures by using AVL, Red and Splay Tree Representation
(Comprehension)
C212.5 To gain the knowledge on Searching, Sorting and Graphs are represented In
Memory. (Knowledge)
C212.6 To evaluate the String, Pattern Matching and Tries algorithms for information
storing and retrieval in a real time system. (Evaluation)
PO/PSO/
PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12 PSO1 PSO2
CO
C212.1 2 3 1 1 - - - - - - - - 1 -
C212.2 1 3 2 - - - - - - - - - 1 -
C212.3 1 2 3 - 1 - - - - - - 2 - 2
C212.4 1 3 2 1 2 - - - - - - 2 - -
C212.5 1 2 1 - - - - - - - - 2 - -
C212.6 1 2 2 - 2 - - - - - - 2 - 2
AVG 1.1 2.5 1.6 1 0.8 - - - - - - 2 1 1
SRI INDU INSTITUTE OF ENGINEERING AND TECHNOLOGY
Accredited by NAAC with A+ Grade, Recognized under 2(f) of UGC Act 1956
(Approved by AICTE, New Delhi and Affiliated to JNTUH, Hyderabad)
Khalsa Ibrahimpatnam, Sheriguda (V), Ibrahimpatnam (M), Ranga Reddy Dist., Telangana – 501 510
Website: https://siiet.ac.in/
COURSE OUTCOMES
PO5 Modern tool usage: Create, select, and apply appropriate techniques, resources, and
modern engineering and IT tools including prediction and modelling to complex
engineering activities with an understanding of the limitations.
PO12 Life-long learning: Recognize the need for, and have the preparation and ability to
engage in independent and life-long learning in the broadest context of technological
change
C212.1 Ability to decide on the data structures like stack, queues and list representation
for Real Time Systems. (Application)
Justification
PO1 Gain knowledge on data structures and able to choose appropriate data structure(level 2)
PO2 Identify the List representation of data structures . (Level 3)
PO3 Design the programs on stack . (Level 1)
PO4 Develop the programs on stacks, queues etc
PSO1 Discover the importance of real time systems in Data stuctures.
C212.2 Design the programs using a variety of Data Structures such as List and
Hashing Representation. (Synthesis)
Justification
PO1 Gain knowledge on Hash representation..(level 1)
PO2 Students able to analyse the performance analysis of various algorithms (Level 3)
PO3 Able to design best algorithms by finding the time and space complexities
PSO1 Discovers Time Complexity of Programs.
C212.3 Analyze and implement the various kinds of data structures in the trees.
(Analysis)
Justification
PO1 Gain knowledge on how to design programs for data structures(Level 1)
PO2 To design the programs students need to analyse the problem
PO3 Develop the programs on Trees
PO5 Develop the programs in c using turbo c editor
PS12 Ability to use these concepts in future scope. (level 2)
PSO2 Discover the Knowledge of ,Binary search trees
C212.4 To illustrate the structures by using AVL, Red and Splay Tree Representation
(Comprehension)
Justification
PO1 Gains knowledge on various searching and Tree methods
PO2 Analyze the solving of searching and Tree methods
PO3 Able to design algorithms for Tree methods
PO4 Develops programs on Red, AVL, Splay Trees.(Level 1)
PO5 Develop programs for searching and sorting methods
PS12 Ability to use these concepts in future scope. (level 2)
C212.5 To gain the knowledge on Searching, Sorting and Graphs are represented In Memory.
(Knowledge)
Justification
PO1 Gains knowledge on various searching and sorting methods
PO2 Analyse the various searching and sorting methods
PO3 develop the programs using various data structures
PS12 Ability to use these concepts in future scope. (level 2)
C212.6 To evaluate the String, Pattern Matching and Tries algorithms for information storing
and retrieval in a real time system. (Evaluation)
Justification
PO1 Gains knowledge on string pattern matching
PO2 Analyze the program before designing the program
PO3 Develop the algorithms on pattern matching
PO5 Develop programs using turbo c editor
PS12 Ability to use these concepts in future scope. (level 2)
PSO2 Discover the Knowledge of ,Tries.
SRI INDU INSTITUTE OF ENGINEERING AND TECHNOLOGY
Accredited by NAAC with A+ Grade, Recognized under 2(f) of UGC Act 1956
(Approved by AICTE, New Delhi and Affiliated to JNTUH, Hyderabad)
Khalsa Ibrahimpatnam, Sheriguda (V), Ibrahimpatnam (M), Ranga Reddy Dist., Telangana – 501 510
Website: https://siiet.ac.in/
Lesson Plan
Number of
Teaching
Unit TOPIC Sessions REFERENCE
S.NO method/Aids
Planned
Introduction to Data Structures 1 Black Board T1
1.
2. abstract data types 1 Black Board T1
3. Linear list – singly linked list 1 Black Board T1
implementation,
4. Insertion operation on linear list, 1 Black Board T1
5. Tutorial 1:(Singly linked list) 1 Black Board T1
6. deletion g operation on linear list 1 Black Board T1
7. Searching operation on linear list Black Board T1
8. Stacks-Operations, 1 Black Board T1
1
9. array and linked representations 1 Black Board T1
of stacks
10. Tutorial 2:(Stack Operations) 1 Black Board T1
11. stack applications 1 Black Board T1
12. Queues-operations 1 Black Board T1
13. array representations 1 Black Board T1
14. linked representations 1 Black Board T1
15. Tutorial 3:(Queue operations) 1 Black Board T1
16. Dictionaries: linear list 1 Black Board T1
representation
17. skip list representation 1 Black Board T1
18. operations -- insertion, deletion 1 Black Board T1
19. Searching operations. 1 Black Board T1
20. Tutorial 4:(linear list 1 Black Board T1
operations)
21.
22. Hash Table Representation: 1 Black Board T1
23. hash functions 1 Black Board T1
24. Collision resolution-separate 1 Black Board T1
chaining
TEXT BOOKS:
T1-Fundamentals of Data Structures in C, 2nd Edition, E. Horowitz, S. Sahni and Susan Anderson Freed,
Universities Press.
REFERENCE BOOKS
R1-Data Structures: A Pseudo code Approach with C, 2nd Edition, R. F. Gilberg and B.A. Forouzan,
Cengage Learning.
WEB REFERENCES
https://www.javatpoint.com/data-structure-tutorial
https://www.geeksforgeeks.org/data-structures/
https://www.hackerearth.com/practice/data-structures/advanced-data-structures/trie-keyword-tree/tutorial/
VIDEO REFERENCES
https://nptel.ac.in/courses/106102064
SRI INDU INSTITUTE OF ENGINEERING AND TECHNOLOGY
Accredited by NAAC with A+ Grade, Recognized under 2(f) of UGC Act 1956
(Approved by AICTE, New Delhi and Affiliated to JNTUH, Hyderabad)
Khalsa Ibrahimpatnam, Sheriguda (V), Ibrahimpatnam (M), Ranga Reddy Dist., Telangana – 501 510
Website: https://siiet.ac.in/
LECTURE NOTES
Unit 1 link:
https://drive.google.com/file/d/1xW1JnZZeo1XiZT5TRxCTt40SFW58dhrB/view?usp=sh
aring
Unit 2 link:
https://drive.google.com/file/d/1F0x0qTh7EMJCYhwtnlM-
n6IdqAAw0eeU/view?usp=sharing
Unit 3 link:
https://drive.google.com/file/d/1x-4q-7hNsWcP1iUkaC-
93UQKTNob9s76/view?usp=sharing
Unit 4 link:
https://drive.google.com/file/d/17W-RSlZHvjm6bFiJTSN6-
9KZJh3pHwhX/view?usp=sharing
Unit 5 link:
https://drive.google.com/file/d/1eCfj3WnWuNAv82zyR_6fuY-6gJ5iWGu-
/view?usp=sharing
SRI INDU INSTITUTE OF ENGINEERING AND TECHNOLOGY
Accredited by NAAC with A+ Grade, Recognized under 2(f) of UGC Act 1956
(Approved by AICTE, New Delhi and Affiliated to JNTUH, Hyderabad)
Khalsa Ibrahimpatnam, Sheriguda (V), Ibrahimpatnam (M), Ranga Reddy Dist., Telangana – 501 510
Website: https://siiet.ac.in/
PPT link:
Unit-1
https://drive.google.com/file/d/1P2OVzMI8zpO2nqeci3Ey7rOapORAb1un/view?usp=sharin
g
Unit-2
https://drive.google.com/file/d/1TAxYt5w8ITX2eMtUpHpI0e8fnMlVkJLY/view?usp=sharin
g
Unit-3
https://drive.google.com/file/d/1eemXEQgVH9X6REBv4WEaBWQECjdyf1pQ/view?usp=sh
aring
Unit-4
https://drive.google.com/file/d/1ysBCtZvObTfFJKRKgHVNSD1MGDFwDWpw/view?usp=s
haring
Code No: 153AK R18
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
B.Tech II Year I Semester Examinations, October - 2020
DATA STRUCTURES
(Common to CSE, IT) Time: 2 hours Max.
Marks: 75
Answer any five questions All questions carry equal marks
---
3. Insert the following list of elements from the AVL tree. Delete the elements 18, 2 and 30
from the AVL tree 12, 30, 36, 18, 25, 9, 4, 2, 17, 14 , 20, 47 [15]
---ooOoo---
Code No: 153AK R18
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
---
2. Insert the following list of elements into the hash table by using Quadratic probing (size
of Hash table is 13) 65, 34, 79, 114, 26, 85, 55, 89, 22, 98. [15]
3. Insert the following list of elements from the Red- Black tree. Delete the elements 18,
2and 30 from the Red-Black tree 12, 30, 36, 18, 25, 9, 4, 2, 17, 14, 20, 47. [15]
6. a) Write an algorithm for insertion of node at last position in Linear Linked List.
b) Evaluate the following postfix expression using stack. Show each step
5 3 + 6 2 / * 3 5 * +. [7+8]
---ooOoo---
Code No: 153AK R18
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
1.a) The following numbers 10, 20, 50, 30, 90, 60 (Top) are present in a stack of size 10.
Perform the following operations in sequence. pop(), push(30), push(40), pop(),
push (60), pop(), pop(), pop() What is the peek element at last? Draw and explain it.
b) Implement a queue data structure using Single Linked list. [8+7]
2.a) The Professor Lilly is very strict in class room. She never gives the attendance to those
who are coming last in her class. Write a function to help Professor to delete the last
Occurrence of a student from the list.
b) Implement a stack data structure using Single Linked list. [8+7]
3.a) Explain how Insertion, Deletion and Search is done in skip lists with example.
b) What is the expected number of probes for both successful and unsuccessful searches
in a linear probing table with load factor 0.25? [7+8]
4.a) Given the input (4371, 1323, 6173, 4199, 4344, 9679, 19891), a fixed table size of 10,
and a hash function H(X) = X mod 10, show the resulting quadratic probing hash table.
b) Outline Double Hashing with an example. [8+7]
5.a)In an initially empty AVL tree insert the following keys: DEC, JAN, APR,MAR, JUL,
AUG, OCT, FEB, NOV. Draw AVL tree after every insertion and apply rotations
where ever necessary.
b) Briefly discuss about different cases of imbalance that might be caused by a red-black
tree insertion and corresponding methods to rebalance the tree. [7+8]
6.a) Construct Splay tree with the following node values: 18, 10, 5, 28, 13, 25,
42,3,56,2,68,1,90. And perform normal splaying at nodes 1 and at node 90.
b) Explain insertion operation with following numbers into Red Black tree
45, 10, 8, 9, 34, 35, 12, 60, 90. [7+8]
7.a) Assume a list containing 4500 records is to be sorted using a computer with internal
memory capable of sorting at most 750 records at a time and input list is maintained on
a disk that has block length of 250 records. For this scenario explain how external
sorting may be performed to accomplish the task.
b) Compare BFS and DFS with suitable examples. [8+7]
8.a) Solve the Boyer-Moore algorithm for the following
Example: Text: ABCABCDABABCDABCDABDE
Pattern: ABCDABD
b) Solve the Knuth Morris-Pratt algorithm for the following
Example: Text: HEREISASIMPLEEXAMPLE
Pattern: EXAMPLE [8+7]
---oo0oo-
--
Sri Indu Institute of Engineering & Technology
Sheriguda (V), Ibrahimpatnam (M), R.R.Dist-501 510
I- Mid Examinations, JAN 2023 Set-I
IIIIII
Year &Branch: II-CSE (A,B&C) Date:23-01-2023(AN)
Subject: Data Structures Max. Marks: 10 Time: 60 MINS
Answer any TWO Questions. All Question Carry Equal Marks 2 * 5 = 10 marks
ANALYSI
S C212.3
25% 25%
KNOWLE
DGE C212.1
50% 50%
COMPRE
HENSION C212.2
25% 25%
Sri Indu Institute of Engineering & Technology
Sheriguda (V), Ibrahimpatnam (M), R.R.Dist-501 510
I - Mid Examinations, JAN-2023 Set-II
Year &Branch: II-CSE(A,B&C) Date:23-01-2023(AN) IIII
Subject: Data Structures Max. Marks: 10 Time: 60 MINS
Answer any TWO Questions. All Question Carry Equal Marks 2 * 5 = 10 marks
1. Classify different types of Data Structure? Write a Program to perform operations of
single linked list? (C212.1) (ANALYSIS) 5M
2. Describe LIFO and it’s performing operations by using arrays with example program?
(C212.1) (KNOWLEDGE) 5M
3. Explain Skip list Representations and perform its operations with example?
(C212.2)(COMPREHENSION) 5M
4. Analyze AVL tree and explain the rotations performed when tree is not balanced?
(C212.3)(ANALYSIS) 5M
KNOWLE C212.3
DGE 25%
ANALYSIS 25% C212.1
50% COMPRE 50%
HENSION C212.2
25% 25%
Sri Indu Institute of Engineering & Technology
Sheriguda (V), Ibrahimpatnam (M), R.R.Dist-501 510
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
B.TECH. II YEAR I SEM., I Mid Term Examinations, January– 2023
DATA STRUCTURES
Objective Exam
Name :_______________________________________ _Hall Ticket No.
Answer All Questions. All Questions Carry Equal Marks. Time: 20Min. Marks: 10.
I Choose the correct alternative:
1. Minimum number of fields in each node of a doubly linked list is ____ [ ]
(A) 2 (B) 3 (C) 4 (D) None of the above
2 .A linear collections of data elements where the linear node is given by means of pointer is
called? [ ]
a) Linked list b) Node list c) Primitive list d) Unordered list
3. On which principle does stack work? [ ]
A) FILO B) FIFO C) LILO D) Both a and c above
4. What is the value of the postfix expression 6 3 2 4 + – * ? [ ]
a) 1 b) 40 c) 74 d) -18
5. A normal queue, if implemented using an array of size MAX_SIZE, gets full when? [ ]
a) Rear = MAX_SIZE – 1 b) Front = (rear + 1)mod MAX_SIZE
c) Front = rear + 1 d) Rear = front
6. What is a hash table? [ ]
a) A structure that maps values to keys b) A structure that maps keys to values
c) A structure used for storage d) A structure used to implement stack and queue
7. If several elements are competing for the same bucket in the hash table, what is it called?[ ]
a) Diffusion b) Replication c) Collision d) Duplication
9. Which of the following is the correct function definition for quadratic probing? [ ]
a) F(i)=i2 b) F(i)=I c) F(i)=i+1 d) F(i)=i2+1
10. What is the speciality about the inorder traversal of a binary search tree? [ ]
a) It traverses in a non increasing order b) It traverses in an increasing order
c) It traverses in a random fashion d) It traverses based on priority of the node
II. Fill in the blanks:
SET-1:
https://drive.google.com/file/d/1FON4H5pFNkXaueLmkJZifBKc5CyOr0Vp/view?usp=sharing
SET2:
https://drive.google.com/file/d/1CYcs5ZsA4Z3LjrcwW5h_uuwFO7zK25dF/view?usp=sharing
DATA STRUCTURES
OBJECTIVE KEY
I - Objectives
1. B
2. A
3. A
4. D
5. A
6. B
7. C
8. A
9. A
10. B
1. Dynamic
2. Linked list
3. Underflow
4. Queue
5. FIFO
6. Clustering
7. Primary collision
8. Rehashing
9. Depth
10. every node is either a leaf or has two children
Sri Indu Institute of Engineering & Technology
Sheriguda (V), Ibrahimpatnam (M), R.R.Dist-501 510
II- Mid Examinations, MAY-2023 Set – I
Year& Branch: II CSE (A,B,C),CS,AI&ML&IOT Date: 3-05-2023(AN)
Subject: CS302ES: Data Structures Marks: 10 Time: 60 min
Answer any TWO Questions. All Question Carry Equal Marks 2*5=10 marks
1 Define AVL tree &Summarise the AVL tree insertion, and searching operations with your
own Example. (5M)(C212.4)(Evaluation)
2 Explain in detail about Heap sort and Merge sort algorithm with example programs
(5M) (C212.4) (Comprehension)
3 Write about graph Traversal methods? (5M) (C212.5)(Knowledge)
4 Analyze the pattern matching algorithms Knuth-Morris-Pratt and boyer moore
(5M)(C212.6) (Analysis)
COMPR
KNOWL C212.6
EHENSI
EDGE 25%
ON
25%
25%
C212.4
50%
ANALYSI APPLICA
S TION C212.5
25% 25% 25%
Sri Indu Institute of Engineering & Technology
Sheriguda (V), Ibrahimpatnam (M), R.R.Dist-501 510
II- Mid Examinations, MAY-2023 Set – II
Year& Branch: II CSE(A,B,C),CS,AI&ML&IOT Date:03-05-2023(AN)
Subject: CS302ES: Data Structures Marks: 10 Time: 60 min
Answer any TWO Questions. All Question Carry Equal Marks 2*5=10 marks
1 Write about Red Black tree and Splay tree with examples (5M) (C212.4) (Knowledge)
2 Classify the graph Traversal methods and its Applications with example??
(5M) (C212.5) (Application)
3 Compare the pattern matching algorithms brute force and boyar Moore algorithm
(5M)(C212.6) (Analysis)
4 Explain about Compressed Tries and Suffix tries? (5M)(C212.6) (Comprehension)
EVALUATI KNOWLE
ON DGE C212.6 C212.4
25% 25% 33% 34%
COMPRE
ANALYSIS HENSION
25% 25%
C212.5
33%
Sri Indu Institute of Engineering & Technology
Sheriguda (V), Ibrahimpatnam (M), R.R.Dist-501 510
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
B.TECH. II YEAR I SEM., II- Mid Term Examinations, MAY– 2023
DATA STRUCTURES
Objective Exam
Name :_______________________________________ _Hall Ticket No.
Answer All Questions. All Questions Carry Equal Marks. Time: 20Min. Marks: 10.
I Choose the correct alternative:
1. The no of external nodes in a full binary tree with n internal nodes is ____ [ ]
(A) n (B) n+1 (C) 2n (D) 2n+1
2. Suppose a complete binary tree has height h>0. The minimum no.of leaf nodes possible in
term of h are? []
h h-1 h-1 h
a) 2 -1 b) 2 +1 c) 2 d) 2 +1
3. When a binary tree is converted in to an extended binary tree, all the nodes of a binary tree in
the external nodes becomes []
A) Internal nodes B) External nodes C) Root nodes D) None
4. If n numbers are to be sorted in ascending order in O(nlogn) time, which of the tree can be
used
[ ]
a) Binary tree b) Binary search tree c) Max-heap d) Min-heap
5. If every node u in G is adjacent to every other node v in G, A graph is said to be….. [ ]
a) Isolated b) Complete c) Finite d) Strongly connected
6. A Binary tree can have? [ ]
a) Can have 2 children b) Can have 1 children c) Can have 0 children d) All
8. Which of the following special type of trie is used for fast searching of the full texts? [ ]
a) Ctrie b) Hash tree c) Suffix tree d) T tree
10. Which of the following is the efficient data structure for searching words in dictionaries
[ ]
a) BST b) Linked list c) Balanced BST d) Trie
II. Fill in the blanks:
SET-1
https://drive.google.com/file/d/1JpmxX_SkdA07_A2DASv8StPN4w65d3Rc/view?usp=sharing
SET-2
https://drive.google.com/file/d/10c_9HjwZ4A8CgbhHNTmpCXHD1-56mhNR/view?usp=sharing
DATA STRUCTURES
OBJECTIVE KEY
I - Objectives
11. B
12. C
13. A
14. D
15. B
16. D
17. B
18. C
19. B
20. D
https://drive.google.com/file/d/10Ucb84WQO8MvdKomygSNfpa4If_y5PCL/view?us
p=sharing
SRI INDU INSTITUTE OF ENGINEERING AND TECHNOLOGY
Accredited by NAAC with A+ Grade, Recognized under 2(f) of UGC Act 1956
(Approved by AICTE, New Delhi and Affiliated to JNTUH, Hyderabad)
Khalsa Ibrahimpatnam, Sheriguda (V), Ibrahimpatnam (M), Ranga Reddy Dist., Telangana – 501 510
Website: https://siiet.ac.in/
1. Define AVL tree &Summarise the AVL tree insertion, and searching operations with your
own Example. (C212.4)(Evaluation)
2. Explain in detail about Heap sort and Merge sort algorithm with example programs?
(C212.4) (Comprehension)
3. Write about graph Traversal methods and applications? (C212.5) (Application)
4. a) Analyze the pattern matching algorithms brute force, Knuth-Morris-Pratt and Boyer-
Moore? (C212.6) (Analysis)
b) Explain about Compressed Tries and Suffix tries? (C212.6) (Comprehension)
5. Write about Red Black tree and Splay tree with examples? (C212.4) (Knowledge)
SRI INDU INSTITUTE OF ENGINEERING AND TECHNOLOGY
Accredited by NAAC with A+ Grade, Recognized under 2(f) of UGC Act 1956
(Approved by AICTE, New Delhi and Affiliated to JNTUH, Hyderabad)
Khalsa Ibrahimpatnam, Sheriguda (V), Ibrahimpatnam (M), Ranga Reddy Dist., Telangana – 501 510
Website: https://siiet.ac.in/
https://drive.google.com/file/d/1qdH-4MYKKx2tIOsG_8axiawNJxY-
jbdg/view?usp=sharing
SRI INDU INSTITUTE OF ENGINEERING AND TECHNOLOGY
Accredited by NAAC with A+ Grade, Recognized under 2(f) of UGC Act 1956
(Approved by AICTE, New Delhi and Affiliated to JNTUH, Hyderabad)
Khalsa Ibrahimpatnam, Sheriguda (V), Ibrahimpatnam (M), Ranga Reddy Dist., Telangana – 501 510
Website: https://siiet.ac.in/
Weak Students:
2 21X31A0510 5 15 16
3 21X31A0512 5 15 15
4 21X31A0531 4 14 16
5 21X31A0535 4 14 14
6 21X31A0539 5 15 17
7 21X31A0544 4 15 16
8 21X31A0546 4 15 16
Advanced learners:
1 21X31A0504 8.047
2 21X31A0506 8.19
21X31A0525
Abstract Data Types, Stack,
3 8.14
Queue, AVL Trees, Red-Black
4 21X31A0534 8.23 tree, Binary Search tree, Graphs,
5 21X31A0540 8.04 Tries
6 21X31A0550 8.07
SRI INDU INSTITUTE OF ENGINEERING AND TECHNOLOGY
Accredited by NAAC with A+ Grade, Recognized under 2(f) of UGC Act 1956
(Approved by AICTE, New Delhi and Affiliated to JNTUH, Hyderabad)
Khalsa Ibrahimpatnam, Sheriguda (V), Ibrahimpatnam (M), Ranga Reddy Dist., Telangana – 501 510
Website: https://siiet.ac.in/
80
70
60
50
APPEARED
40
PASSED
30
20
10
0
SRI INDU INSTITUTE OF ENGINEERING AND TECHNOLOGY
Department of Computer science and Engineering
S.No HT No. Q1a Q1b Q1c Q2a Q2b Q2c Q3a Q3b Q3c Q4a Q4b Q4c Obj1 A1
Max. Marks ==> 10 5
1 21X31A0501 5 2 9 5
2 21X31A0502 5 5 10 5
3 21X31A0503 2 4 8 5
4 21X31A0504 5 3 9 5
5 21X31A0505 2 5 9 5
6 21X31A0506 5 5 10 5
7 21X31A0507 1 2 8 5
8 21X31A0508 2 5 9 5
9 21X31A0509 5 4 10 5
10 21X31A0510 1 9 5
11 21X31A0511 2 5 9 5
12 21X31A0512 2 8 5
13 21X31A0513 3 5 9 5
14 21X31A0514 3 4 9 5
15 21X31A0515 2 5 9 5
16 21X31A0516 2 9 5
17 21X31A0517 2 4 8 5
18 21X31A0518 2 3 9 5
19 21X31A0519 1 3 9 5
20 21X31A0520 2 4 9 5
21 21X31A0521 2 5 10 5
22 21X31A0522 3 3 9 5
23 21X31A0523 5 4 10 5
24 21X31A0524 3 4 9 5
25 21X31A0525 5 5 10 5
26 21X31A0526 2 5 10 5
27 21X31A0527 2 4 9 5
28 21X31A0528 1 2 8 5
29 21X31A0529 1 5 9 5
30 21X31A0530 4 3 9 5
31 21X31A0531 1 8 5
32 21X31A0532 2 3 9 5
33 21X31A0533 5 5 10 5
34 21X31A0534 5 5 10 5
35 21X31A0535 1 8 5
36 21X31A0536 1 2 9 5
37 21X31A0537 2 4 9 5
38 21X31A0538 3 5 8 5
39 21X31A0539 4 8 5
40 21X31A0540 5 5 10 5
41 21X31A0541 2 4 9 5
42 21X31A0542 3 3 9 5
43 21X31A0543 3 4 8 5
44 21X31A0544 0 4 8 5
45 21X31A0545 5 2 9 5
46 21X31A0546 2 1 8 5
47 21X31A0547 1 8 5
48 21X31A0548 2 5 9 5
49 21X31A0549 1 4 8 5
50 21X31A0550 1 3 7 5
52 21X31A0552 1 4 7 5
53 21X31A0554 4 5 10 5
54 21X31A0555 2 4 9 5
55 21X31A0556 2 5 9 5
56 21X31A0557 4 5 10 5
57 21X31A0559 3 3 9 5
58 21X31A0560 5 4 10 5
59 21X31A0561 2 3 8 5
60 21X31A0562 3 3 9 5
61 21X31A0563 3 5 9 5
62 21X31A0564 4 5 9 5
63 21X31A0565 3 5 9 5
64 22X35A0501 3 5 9 5
65 22X35A0502 4 2 9 5
66 22X35A0503 2 3 7 5
67 22X35A0504 2 2 7 5
68 22X35A0505 4 4 10 5
69 22X35A0506 2 3 9 5
70 22X35A0507 2 3 9 5
71 22X35A0508 2 4 9 5
Target set by the 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 6.00 3.00
faculty / HoD
Number of students
performed above the 27 0 0 40 1 0 64 0 0 1 0 0 70 70
target
Number of students 27 0 0 40 1 0 64 0 0 1 0 0 70 70
attempted
Percentage of students
scored more than 100% 100% 100% 100% 100% 100% 100%
target
CO - 1 y y y y
CO - 2 y y y
CO - 3 y y y
CO - 4 y y
CO - 5
CO - 6
S.No HT No. Q1a Q1b Q1c Q2a Q2b Q2c Q3a Q3b Q3c Q4a Q4b Q4c Obj2 A2
Max. Marks ==> 5 5 5 5 10 5
1 21X31A0501 5 3 8 5
2 21X31A0502 2 5 9 5
3 21X31A0503 2 3 8 5
4 21X31A0504 3 5 8 5
5 21X31A0505 5 2 7 5
6 21X31A0506 5 5 9 5
7 21X31A0507 4 2 7 5
8 21X31A0508 5 7 5
9 21X31A0509 5 4 8 5
10 21X31A0510 2 9 5
11 21X31A0511 5 2 9 5
12 21X31A0512 1 1 8 5
13 21X31A0513 5 5 9 5
14 21X31A0514 3 5 8 5
15 21X31A0515 5 5 8 5
16 21X31A0516 4 5 5
17 21X31A0517 5 7 5
18 21X31A0518 5 4 8 5
19 21X31A0519 2 5 7 5
20 21X31A0520 4 5 8 5
21 21X31A0521 9 5
22 21X31A0522 4 4 8 5
23 21X31A0523 5 3 9 5
24 21X31A0524 5 5 9 5
25 21X31A0525 5 5 9 5
26 21X31A0526 5 5 8 5
27 21X31A0527 3 5 8 5
28 21X31A0528 1 8 5
29 21X31A0529 2 5 7 5
30 21X31A0530 4 3 7 5
31 21X31A0531 1 8 5
32 21X31A0532 1 3 7 5
33 21X31A0533 5 5 9 5
34 21X31A0534 5 5 9 5
35 21X31A0535 9 5
36 21X31A0536 3 1 6 5
37 21X31A0537 5 3 7 5
38 21X31A0538 5 5 9 5
39 21X31A0539 3 3 6 5
40 21X31A0540 5 5 9 5
41 21X31A0541 4 3 7 5
42 21X31A0542 5 3 7 5
43 21X31A0543 4 4 8 5
44 21X31A0544 1 8 5
45 21X31A0545 5 5 9 5
46 21X31A0546 2 8 5
47 21X31A0547 9 5
48 21X31A0548 4 5 8 5
49 21X31A0549 3 1 7 5
50 21X31A0550 3 2 8 5
51 21X31A0552 2 2 7 5
52 21X31A0554 5 5 9 5
53 21X31A0555 3 2 8 5
54 21X31A0556 4 7 5
55 21X31A0557 5 5 9 5
56 21X31A0559 1 3 7 5
57 21X31A0560 5 5 9 5
58 21X31A0561 3 2 7 5
59 21X31A0562 5 3 7 5
60 21X31A0563 4 5 8 5
61 21X31A0564 5 5 9 5
62 21X31A0565 3 4 7 5
62 22X35A0501 1 5 7 5
62 22X35A0502 5 4 7 5
62 22X35A0503 5 1 7 5
62 22X35A0504 3 4 7 5
62 22X35A0505 5 4 9 5
62 22X35A0506 5 3 8 5
62 22X35A0507 4 1 7 5
62 22X35A0508 5 3 8 5
Target set by the 3.00 0.00 0.00 3.00 0.00 0.00 3.00 0.00 0.00 3.00 0.00 0.00 6.00 3.00
faculty / HoD
Number of students 39 0 0 10 0 0 32 0 0 18 0 0 69 70
performed above the
target
Number of students 42 0 0 18 0 0 43 0 0 22 0 0 70 70
attempted
Percentage of
students scored 93% 56% 74% 82% 99% 100%
more than target
CO - 1
CO - 2
CO - 3
CO - 4 y y y
CO - 5 y y y
CO - 6 y y y y
CO - 2
CO - 3
CO - 4 93% 99% 100%
CO - 5 56% 99% 100%
CO - 6 74% 82% 99% 100%
CO-PO mapping
PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12 PSO1 PSO2
CO1 2 3 1 1 - - - - - - - - 1 -
CO2 1 3 2 - - - - - - - - - 1 -
CO3 1 2 3 - 1 - - - - - - 2 - 2
CO4 1 3 2 1 2 - - - - - - 2 - -
CO5 1 2 1 - - - - - - - - 2 - -
CO6 1 2 2 - 2 - - - - - - 2 - 2
Course 1.1 2.5 1.6 1 0.8 - - - - - - 2 1 1
PO-ATTAINMENT
PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12 PSO1 PSO2
CO
Attainm
ent 0.55 1.25 0.80 0.50 0.40 1.00 0.50 0.50
https://drive.google.com/file/d/1kGJY8IgjhF5pGZ-
7OaTE_MvbXTe3aWC7/view?usp=sharing