You are on page 1of 35

COURSE FILE CONTENT

1. Institute Vision & Mission, Department Vision & Mission


2. PEO, PO& PSO Statements
3. Course Information Sheet (CIS)
3.1. Academic Calendar
3.2. Subject Time Table
3.3. Syllabus
3.4. General Objectives & Specific Objectives
3.5. Program Outcomes & Program Specific Outcomes
3.6. Course Outcomes
3.7. Relationship of COs to POs & Relationship of COs to PSOs
3.8. Teaching Plan
3.9. Result Analysis (Past 3 Years) with Bar chart
4. Lecture Notes
4.1. Unit Wise Lecture Notes
4.2. Add on Course Material
5. Question Bank
5.1. Unit Wise Question Bank
5.2. University Question Papers
6. Continuous Evaluation
6.1. Mid Question Papers with Key
6.2. Unit Test Question Papers with Key
6.2.1 Sample Unit Test Answer Sheets
6.2.2 Sample Assignment Sheets
7. Attendance Register (Daily Attendance & Topic Delivery Report)
8. CD / DVD (All Course Information - like NPTEL, MIT lectures, Unit wise PPT Slides etc..)
TEEGALA KRISHNA REDDY ENGINEERING COLLEGE
(Sponsored by TKR Educational Society, Approved by AICTE, Affiliated by JNTUH)
Medbowli, Meerpet, Saroornagar, Hyderabad-500097
Phone: 040-24092838 Fax: +91-040-24092555
E-mail: tkrec@rediffmail.com Website: www.tkrec.ac.in

1. INSTITUTE VISION AND MISSION, DEPARTMENT VISION AND MISSION

INSTITUTEVISIONANDMISSION

Vision:
Imparting Knowledge and instilling skills to the aspiring students in the field of Engineering,
Technology, Science and Management to face the emerging challenges of the society.

Mission:
Mission 1: Encouraging scholarly activities that transfer knowledge in the areas of Engineering,
Technology, Science and Management.

Mission 2: Ensuring students of all ability levels are well trained to meet the needs of education and
their future endeavors.

Mission 3: Inculcating human values and ethics into the education system for the all-round
development of the students.
DEPARTMENT VISIONANDMISSION

Vision:
The department of Information Technology focuses to produce technically strong graduates in
the field of Information Technology, who will be useful for the society.

Mission:

Mission 1: To impart sound knowledge in English, basic sciences and Information


Technology which will improve students employability.

Mission 2: To train the graduates and inculcate the importance of communication skills,
research and to pursue for higher studies by conducting workshops, seminars.

Mission 3: During graduation, students are encouraged to learn ethics.


2. PEO, PO AND PSO STATEMENTS
PROGRAM EDUCATIONAL OBJECTIVES PEOS:

PEO 1: Graduates engage in professional development and make use of the available resources.
PEO 2: Graduates of Information Technology try to improve in professional career with problem
solving ability for providing Information Technology solutions by proper plan, analysis, design,
implementation and validation.
PEO 3: Graduates of the Information Technology program are prepared for their successful
career in the Information Technology industry / seek higher studies and continue to develop.
PROGRAM OUTCOMES (PO):

Engineering Graduates will be able to:

1. Engineering knowledge: An ability to apply knowledge of Programming, mathematics,


science, fundamentals in Computer Science and Engineering.
2.Problem analysis: An ability to analyze complex problems using the principles of Maths,
science and Engineering .
3.Design/ development of solutions: An ability to design, implement a computer based
system, with desire program to meet the needs of social and environmental considerations.
4.Conduct investigations of complex problems: An ability to apply mathematical formulas,
algorithmic principles and computational theory to develop a model and design of computer
based system.
5.Modern tool usage: An ability to use and understand hands on experience of the current
techniques, tools, resources, skills and modern engineering tools necessary for computer
engineering practice.
6.The engineer and society: An ability to analyze the impact of computing in different
organizations, society including the varying policy issues that are taken care off.
7.Environment and sustainability: understanding of impact of engineering solutions on the
environment and this attains sustainability with responsibility.
8.Ethics: An ability to lead a strong professionalism and the ethical values.
9.Individual and team work: An ability to function effectively on multidisciplinary
environments leads to leadership and member of team work.
10.Communication: An ability to communicate effectively in both verbal and written form
which enables to prepare well documentation for report writing and a project.

11. Project management and finance:Apply project management practices to the launch of
new programs, initiatives, products, services, and events relative to the stakeholder needs
including finance.

12.Life-long learning: Recognition of the need for higher studies and inspires to update the
latest technologies by the way of life long learning process from time to time .

PROGRAM SPECIFIC OUTCOMES(PSO):

1. PSO1: Acquire knowledge will be used to design and modify principles in the development
of software and hardware systems to get a better quality product.

2. PSO2: An ability to identify the state of professional development in preparing for


competitive examinations that offer successful career and career building.
3. COURSE INFORMATION SHEET (CIS)

PROGRAMME:INFORMATION TECHNOLOGY DEGREE:BTECH

COURSE:DATA STRUCTURE THROUGH C++ YEAR/SEMESTER: II/I

COURSECODE:53023 CREDITS:4

REGULATION: R09 COURSE TYPE:CORE


COURSE AREA/DOMAIN:IT HOURS:5HOURS/WEEK.

BRIDGECLASS:01 /WEEK TUTORIAL:1HOURS/WEEK.

INTERNAL MARKS:25 EXTERNAL MARKS:75

CORRESPONDINGLAB COURSECODE(IFANY):53617 LABCOURSENAME: DATA


STRUCTURE THROUGH C++ LAB
3.1. ACADEMIC CALENDAR

JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD

Kukatpally, Hyderabad 500085 Andhra Pradesh- INDIA

Academic Calendar for II, III, IV B. Tech. I Sem. 2013-14

Date No. of
Description
From To Weeks
First Spell of Instructions 01-07-2013 24-08-2013 08
First Mid Examinations 26-08-2013 28-08-2013 3 days
Second Spell of Instructions 29-08-2013 11-10-2013 06
Continuation of Second Spell of
21-10-2013 26-10-2013 01
Instructions
Second Mid Examinations 28-10-2013 30-10-2013 3 days
Preparation & Practical
31-10-2013 08-11-2013 9 days
Examinations
End Semester Examinations 11-11-2014 23-11-2014 02
Supplementary examinations 25-11-2013 07-12-2013 02
Commencement of Class work for the next AY 2014-15 09-12-2013

Month Holidays
JUN 02,09,16,23,30 Sundays
JUL 07,14,21,28 Sundays
AUG 04,11,18,25 Sundays
15 Independence day
28 Janmashtami
01,08,15,22,29 Sundays Holidays are
SEP 9 Ganesh chathurthi subjected to
clearance
18 Ganesh nimajjanam from AP
06,13,20,27 Sundays Government
OCT 12to20 Dussehra holidays
2 Gandhi jayanthi
03,10,17,24 Sundays
03 Deewali
NOV
05 Moharram
17 Gurunanakjayanthi
3.2 SUBJECT TIME TABLE

Name of the Faculty: AY: 2013-14I Sem.

Subject: Data Structures through c++ Class: II/IB.TechIT

1 2 3 7
4 5 6
(9:40 (10:30 11:20 (11:30 1:10 (3:30
(12:20 (1:50 PM (2:40 PM
DAY AM - AM - - AM - - PM
PM - 1:10
10:30 11:20 11:30 12:20 1:50 4:20
PM) 2:40 PM) 3:30 PM)
AM) AM) PM) PM)
MON CC

TUE
BREAK

LUNCH
WED CC

THU

FRI CC
SAT CC
CoursePre-Requisites(Fundamentals)

COMPUTER NETWORK- Computer network is a telecommunication channel through


which we can share our data. It is also called data network. -Year /Sem- III-I

OPEARTING SYSTEM-An operating system (OS) is system software that


manages computer hardware and software resources and provides common
services for computer programs-Year /Sem- III-I

3.3 SYLLABUS

JAWAHARLAL NEHRU TECHNOLOGY UNIVERSITY, HYDERABAD

II Year B.Tech. IT I Sem(R09). L T/P/D C

4 -/-/- 4

Objectives:

1. To introduce the concepts of Abstract data Type, data structure, performance


measurement, time and space complexities ofalgorithms.

2. To discuss the implementation linear data structures such as stacks, queues and lists and
their applications.

3. To discuss the implementation of different non linear data structures such as


treesand graphs.

4. To introduce various search data structures such as hashing, binary search trees,
redblack trees, splay trees andb-trees.

5. To introduce various internal sorting techniques and analyze their time complexities.

Unit I:

C++ Class Overview- Class Definition, Objects, Class Members, Access Control, ClassScope,
Constructors and destructors, parameter passing methods, Inline functions,static classmembers,
this pointer, friend functions, dynamic memory allocation and deallocation (new and delete),
exception handling.

Unit II:
Function Overloading, Operator Overloading, Generic Programming- Function and class
templates, Inheritance basics, base and derived classes, inheritance types, base classaccess
control, runtime polymorphism using virtual functions, abstract classes, streams I/O.

Unit III:

Algorithms, performance analysis-time complexity and space complexity, O-notation, Omega


notation and Theta notation, Review of basic data structures - the list ADT, stackADT, queue
ADT, implementation using template classes in C++, sparse matrixrepresentation.

Unit IV:

Dictionaries, linear list representation, skip list representation, operations- insertion,deletion


and searching, hash table representation, hash functions, collision resolution separate chaining,
open addressing-linear probing, quadratic probing, double hashing, rehashing, extendible
hashing, comparison of hashing and skip lists.

Unit V:-

Priority Queues Definition, ADT, Realizing a Priority Queue using Heaps, Definition,
insertion, Deletion, Application-Heap Sort, External Sorting- Model for external sorting,
Multiway merge, Polyphase merge.

Unit VI:-

Search trees (part I): Binary search trees, definition, ADT, implementation,
operationssearching, insertion and deletion, Balanced search trees- AVL trees, definition,
height of
an AVL tree, representation, operations-insertion, deletion and searching.
Search trees (part II) :Introduction to Red Black trees and Splay Trees, B-Trees-B-Tree
of order m, height of a B-Tree, insertion, deletion and searching, Comparison of SearchTrees.

Unit VII:-

Divide and Conquer- General method, applications Binary search, merge sort, quicksort,
Strassens matrix multiplication Efficient non recursive tree traversal algorithms, Biconnected
components. Disjoint set operations, union and findalgorithms.

Unit VIII:-
Greedy method and Dynamic programming : General method (Greedy), Minimum cost
spanning trees, Job sequencing with deadlines, General method (DynamicProgramming),
Optimal binary search trees, 0/1 knapsack problem, Ordering MatrixMultiplications

TEXT BOOKS :

1. Data Structures and Algorithm Analysis in C++, Mark Allen Weiss, Pearson Education,
second edition.
2. Data structures, Algorithms and Applications in C++,S.Sahni,University press (India)
pvt ltd, 2nd edition, Orient Longman pvt.ltd.

REFERENCE :

1. Data structures and Algorithms in C++, Michael T.Goodrich, R.Tamassia and D.Mount,
Seventh Edition Wiley student edition, John Wiley and Sons.
2. Data Structures and Algorithms in C++, Third Edition, Adam Drozdek, Thomson
3. Problem solving with C++, The OOP, Fourth edition, W.Savitch, Pearson education.
4. C++, The Complete Reference, 4th Edition, Herbert Schildt, TMH.
5. Data structures using C and C++, Langsam, Augenstein and Tanenbaum, PHI/Pearson
Education.

3.4 GENERAL OBJECTIVES & SPECIFIC OBJECTIVES

General objectives:

1. To understand the basic structure concept such as Abstract Data Types, Linear and Non
Linear Data structures.
2. To understand the notations used to analyze the Performance of algorithms.
3. To understand the behavior of data structures such as stacks, queues, trees, hash tables,
search trees, Graph and their representations.
4. To choose the appropriate data structure for a specified application.
5. To understand and analyze various searching and sorting algorithms.
6. To write programs in C to solve problems using data structures such as array, linked lists,
queues, trees, graphs, hash tables, search trees.
Specific objectives:

1. To gain the knowledge of basic data structures, complexities like time and space
complexity, linked list.
2. To demonstrate about stacks and its applications, queues and different types of queues.
3. To demonstrate about Trees and graphs their terminology, types and traversal.
4. To understand about different types of searching and sorting techniques.
5. To demonstrate different pattern matching algorithms and tries.

3.5 PROGRAM OUTCOMES AND PROGRAM SPECIFIC OUTCOMES

PROGRAM OUTCOMES

POS PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12
TOTAL 18 10 11 10 13 3 11 6 13 5 12 9
100 55 61 55 72 16 61 33 72 27 66 50
PERCENTAGE

120

100

80

60
Series3
40

20

0
PROGRAM SPECIFIC OUTCOMES PSOS

PSOs PSO1 PSO2


TOTAL 11 12
PERCENTAGE 61 67

80

70

60

50

40 TOTAL
PERCENTAGE
30

20

10

0
PSO1 PSO2
3.6 COURSE OUTCOMES

SNO COURSE OUTCOMES

Students are able to analyze algorithms and determine their time complexity and
1
space complexity.
Students are able to implement linked list data structure to solve various problems
and they are able to understand and apply various data structure such as stacks,
2 queues, trees and graphs to solve various computing problems using C-
programming language.

Able to implement and know when to apply standard algorithms for searching and
3
sorting.
Ability to analyze the problem and solve problems independently and think
4
critically.
5 Students can learn how to use data structure concepts for realistic problems.
Students will get an ability to identify appropriate data structure for solving
6 computing problems in respective language
3.7 RELATIONSHIP OF COS TO POS AND RELATIONSHIP OF COS TO PSOS

Teaching /learning A combination of lectures, tutorial classes and laboratory


sessions is used to deliver the various topics in the
Methodology subject. Some of the topics

Relationship ofCourseOutcomes(CO) to Program Outcomes (PO) and Program Specific Outcomes

1Slightly 2Moderately 3Substantive

PO PO P P P P P P P P P P P PS PS
1 O O O O O O O O O O O O O
6 1 2
2 3 4 5 7 8 9 1 1 1
0 1 2

Course
outcomes

1 3 2
3 3 3 1 3 1 3 1 3 1 3 3
2 2 3
3 1 1 1 1 - 1 1 1 1 3 2
3 2 2
3 2 1 1 2 1 1 1 2 - 3 1
4 1 1
3 2 3 2 3 - 3 1 3 - 3 1
5 2 2
3 1 1 3 2 1 1 1 2 1 - 1
6 1 2
3 1 2 2 2 - 2 1 2 2 - 1
DEGREE OF 10 5 6 5 7 1 6 3 7 2 6 5 61 66
CONTRIBUT 0 5 1 5 2 6 1 3 2 7 6 0
ION % %
% % % % % % % % % % % %

Above 70% is considered as strong contribution

Above 50% and below 70% is considered as average contribution

Below 50% is considered as some contribution

Zero is considered as no contribution


RELATIONSHIP OF COURSE OUTCOMES TO PROGRAM OUTCOMES:

Course Name: DATA STRUCTURE THROUGH C++for Academic Year 2013-14 (II-I)

CO PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12
C213.1 3 3 3 1 3 1 3 1 3 1 3 3
C213.2 3 1 1 1 1 - 1 1 1 1 3 2
C213.3 3 2 1 1 2 1 1 1 2 - 3 1
C213.4 3 2 3 2 3 - 3 1 3 - 3 1
C213.5 3 1 1 3 2 1 1 1 2 1 - 1
C213.6 3 1 2 2 2 - 2 1 2 2 - 1
Avg 3 2 2 2 2 1 2 1 2 1 3 2

RELATIONSHIP OF COURSE OUTCOMES TO PROGRAM SPECIFICOUTCOMES:

Course Name: Data Structure for Academic Year 2013-14 (II-I)

CO PSO1 PSO2
1 3 2
2 2 3
3 2 2
4 1 1
5 2 2
6 1 2
Average 2 2
3.8 TEACHING PLAN

Year & Branch : II B. Tech. IT


Academic Year : 2013 - 14. I Semester
Name of the Subject : DATA STRUCTURE THROUGH C++
Name of the Faculty :
Designation :
Department :Information Technology.

TEXT BOOKS:
T-1.Data Structures and Algorithm Analysis in C++, Mark Allen Weiss, Pearson Education,
second edition.
T-2.Data structures, Algorithms and Applications in C++,S.Sahni,University press (India)
pvt ltd, 2nd edition, Orient Longman pvt.ltd.

REFERENCE BOOKS:
R -1.. Data structures and Algorithms in C++, Michael T.Goodrich, R.Tamassia and D.Mount,
Seventh Edition Wiley student edition, John Wiley and Sons.
R -2.Data Structures and Algorithms in C++, Third Edition, Adam Drozdek, Thomson
R -3.Problem solving with C++, The OOP, Fourth edition, W.Savitch, Pearson education.
R -4. C++, The Complete Reference, 4th Edition, Herbert Schildt, TMH.
R -5. Data structures using C and C++, Langsam, Augenstein and Tanenbaum, PHI/Pearson
Education.
TEACHING
UNIT DETAILS HOURS AIDS

UNIT-I
C++ Class Overview Class Definition, Objects, Class BB
Members, Access Control, Class 2
Scope
Constructors and destructors, 3 BB
parameter passing methods, Inline
functions, static class members,
this pointer
friend functions, dynamic memory 2 BB/LCD
allocation and deallocation,
exception handling
UNIT-II
Generic Programming Function Overloading, Operator 2 BB/LCD
Overloading
Generic Programming- Function 2 BB/LCD
and class templates
Inheritance basics, base and 2 BB/LCD
derived classes, inheritance types,
base class access control
runtime polymorphism using 2 BB/LCD
virtual functions, abstract classes,
streams I/O
UNIT-III
Algorithms & Review Algorithms, performance analysis- 2 BB/LCD
time complexity and space
of basic data structures complexity

O-notation, Omega notation and 2 BB/LCD


Theta notation
Review of basic data structures - 2 BB/LCD
the list ADT, stack
ADT, queue ADT
implementation using template 3 BB/LCD
classes in C++, sparse matrix
representation
UNIT-IV BB/LCD
Dictionaries& Hashing Dictionaries, linear list 3 BB/LCD
representation, skip list
representation, operations-
insertion, deletion and searching
hash table representation, hash 2 BB/LCD
functions, collision resolution
separate chaining
open addressing-linear probing, 3 BB/LCD
quadratic probing, double hashing,
rehashing, extendible hashing,
comparison of hashing and skip
lists
UNIT-V
Priority Queues Priority Queues Definition, 2 BB/LCD
ADT, Realizing a Priority Queue
using Heaps, Definition,
insertion, Deletion
Application-Heap Sort, External 3 BB/LCD
Sorting- Model for external sorting
Multiway merge, Polyphase merge 3 BB/LCD
UNIT-VI
Search trees Binary search trees, definition, 2 BB/LCD
ADT, implementation, operations
searching, insertion and deletion
Balanced search trees- AVL trees, 2 BB/LCD
definition, height of
an AVL tree, representation,
operations-insertion, deletion and
searching
Introduction to Red Black trees 2 BB/LCD
and Splay Trees
B-Trees-B-Tree of order m, height 3 BB/LCD
of a B-Tree, insertion, deletion and
searching, Comparison of Search
Trees
UNIT-VII
Divide and Conquer Divide and Conquer- General 3 BB/LCD
method, applications Binary
search, merge sort, quick
sort
Strassens matrix multiplication 2 BB/LCD
Efficient non recursive tree
traversal algorithms
Biconnected components. Disjoint 3 BB/LCD
set operations, union and find
algorithms
UNIT-VIII
Greedy method and General method , Minimum cost 2 BB/LCD
spanning trees
Dynamic programming
Job sequencing with deadlines, 3 BB/LCD
General method
Optimal binary search trees, 0/1 3 BB/LCD
knapsack problem, Ordering
Matrix Multiplications
Total 65
Page (s) Propo
Unit
Book sed
/ Propos
Topic (s) Refere Fro No. of
Item To Perio ed Date
nce m
No.
ds

I C++ Class Overview 7

1.1 Class Definition, Objects, Class Members, Access


Control, Class T-1 2
Scope
Constructors and destructors, parameter passing 3
1.2 methods, Inline functions, static class members, this T-1
pointer
1.3 friend functions, dynamic memory allocation and T-1 2
deallocation, exception handling
II Generic Programming 8

2.1 Function Overloading, Operator Overloading T-2 2

2.2 Generic Programming- Function and class templates T-2 2

2.3 Inheritance basics, base and derived classes, T-2 2


inheritance types, base class access control
2.4 runtime polymorphism using virtual functions, T-2 2
abstract classes, streams I/O
III Algorithms & Review of basic data structures 9

3.1 Algorithms, performance analysis-time complexity T-2 2


and space complexity
3.2 O-notation, Omega notation and Theta notation T-2 2

3.3 Review of basic data structures - the list ADT, stack T-2 2
ADT, queue ADT
3.4 implementation
matrix
using template classes in C++, sparse T-2 3
representation

IV 8
Dictionaries& Hashing

4.1 Dictionaries, linear list representation, skip list


representation, operations- insertion, deletion and T-2 3
searching
4.2 hash table representation, hash functions, collision 2
resolution separate chaining
open addressing-linear probing, quadratic probing, 3
4.3 double hashing,
rehashing,extendible hashing, comparison of hashing
and skip lists
Page (s) Propo
Unit
Book sed
/ Propos
Topic (s) Refere Fro No. of
Item To Perio ed Date
nce m
No.
ds

V Priority Queues 8

5.1 Priority Queues Definition, ADT, Realizing a 2


Priority Queue using Heaps, Definition,
insertion, Deletion
5.2 Application-Heap Sort, External Sorting- Model for 3
external sorting
5.3 Multiway merge, Polyphase merge 3

VI Search trees 9
Binary search trees, definition, ADT, implementation, 2
operationssearching, insertion and deletion
Balanced search trees- AVL trees, definition, height 2
of
an AVL tree, representation, operations-insertion,
deletion and searching
Introduction to Red Black trees and Splay Trees 2
B-Trees-B-Tree of order m, height of a B-Tree, 3
insertion, deletion and searching, Comparison of
Search
Trees
VII Divide and Conquer 8
Divide and Conquer- General method, applications 3
Binary search, merge sort, quick
sort
Strassens matrix multiplication Efficient non 2
recursive tree traversal algorithms
Biconnected components. Disjoint set operations, 3
union and findalgorithms
VIII Greedy method and Dynamic programming 8
General method , Minimum cost spanning trees 2
Job sequencing with deadlines, General method 3
Optimal binary search trees, 0/1 knapsack problem, 3
Ordering Matrix Multiplications
3.9 RESULT ANALYSIS

Academic Year Pass Percentage Fail Percentage


2013-2014

Graph
4. LECTURE NOTES
4.1 Unit Wise Lecture Notes:

Hard copy available

4.2 Add On Course Material:

S.NO Topic name


1 1.ScapeGoat Tree
http://www.geeksforgeeks.org/scapegoat-tree-set-1-
introduction-insertion/

2 2.Treap(A Randomized Binary Search Tree)


http://www.geeksforgeeks.org/treap-a-randomized-binary-
search-tree/
3 3.Unrolled Linked List
http://www.geeksforgeeks.org/unrolled-linked-list-set-1-
introduction/
5. QUESTION BANK

5.1 UNIT WISE QUESTION BANK

UNIT-1

1. Write the difference between references and pointers?


2. How to dynamically allocate a 2D array in C++?
3. Explain the role of protected access modifier?
4. Mention the storage classes in c++?
5. Are the exceptions and errors same?

UNIT-2

1. List the types of inheritance in c++?


2. Can main() be overloaded?
3. When should we write our assignment operator?
4. Can virtual functions be inlined?
5. Distinguish between shallow copy and deep copy?

UNIT-3

1. Explain the term definiteness with regard to an algorithm?


2. Explain the difference between performance analysis and performance measurement?
3. Write a recursive function that returns the number of 1 in the binary representation Of N.
Use the fact that this is equal to the number of 1 in the representation of N/2 plus 1, if N
is odd.
4. Prove that for any constant k, logkN=O(N)
5. Solve the following recurrence relation T(n)=3T(n/2)+n2, T(1)=1

UNIT-4

1. List the advantages of linked list over arrays?


2. In circular linked lists, how the end of list condition will be tested?
3. Explain hashing function?
4. Explain the difference between linear probing and quadratic probing?
5. Compare hashing and skip list?

UNIT-5

1. Define input restricted queue and output restricted queue with suitable example.
2. How do you represent a queue in computers memory?
3. Write a program to implement concept of multiple queues with an example.
4. Evaluate the following postfix expression 123+*
5. Define Expression? What are types of expression

UNIT-6

1. Suppose a binary tree T is in memory. Write a procedure to delete all the terminal nodes
in T.
2. Write an algorithm to convert forest into a binary tree?
3. How the height of a BST effects its performance?
4. Describe AVL Trees insertion and deletion method?
5. Differentiate between the B+ tree index files and B-tree index files.

UNIT-7

1. Suppose a binary tree T is in memory. Write a procedure to delete all the terminal nodes
in T.
2. Write an algorithm to convert forest into a binary tree?
3. How the height of a BST effects its performance?
4. Describe AVL Trees insertion and deletion method?
5. Differentiate between the B+ tree index files and B-tree index files.

UNIT-8

1. List the different algorithms used for implementing minimum spanning tree?
2. Prove that in finite graph the number of vertices of odd degree is always even?
3. Write a procedure to compute length of shortest path of directed graph?
4. Describe AVL Trees insertion and deletion method?
5. Differentiate between the B+ tree index files and B-tree index files.
5.1 UNIVESITY QUESTION PAPERS
6. CONTINUOUS EVALUATION

6.1 Mid Question Papers


TEEGALA KRISHNA REDDY ENGINEERING COLLEGE

II B.TECH I SEMESTER I MID EXAMINATIONS (ACADEMIC YEAR 2013-14)

SUBJECT: DATA STRUCTURE (IT )

Date of Exam: Time:10.00 am to 11.30 am Max. Marks: 10

Answer any TWO Questions from the following 2*5=10

1. Discuss which data structure used in recursion?


2. List the operations that can be performed on DEQUEUE?
3. State the different ways of representing expressions?
4. Discuss which data structure used in recursion?

Choose the correct answer

1. Which if the following is/are the levels of implementation of data structure


A) Abstract level B) Application level
C) Implementation level D) All of the above

2. A binary search tree whose left subtree and right subtree differ in hight by at most 1
unit is called
A) AVL tree B) Red-black tree
C) Lemma tree D) None of the above

3. .. level is where the model becomes compatible executable code


A) Abstract level B) Application level
C) Implementation level D) All of the above
4. Stack is also called as
A) Last in first out B) First in last out
C) Last in last out D) First in first out

5. Which of the following is true about the characteristics of abstract data types?
i) It exports a type.
ii) It exports a set of operations
A) True, False B) False, True
C) True, True D) False, False
6. is not the component of data structure.
A) Operations B) Storage Structures
C) Algorithms D) None of above

7. Which of the following is not the part of ADT description?


A) Data B) Operations
C) Both of the above D) None of the above

8. Inserting an item into the stack when stack is not full is called . Operation
and deletion of item form the stack, when stack is not empty is called ..operation.
A) push, pop B) pop, push
C) insert, delete D) delete, insert

9. . Is a pile in which items are added at one end and removed from the other.
A) Stack B) Queue
C) List D) None of the above

10. is very useful in situation when data have to stored and then retrieved in
reverse order.
A) Stack B) Queue
C) List D) Link list

Fill in the blanks

11. A _________ is a special member function used to initialize the data members of a class.
(constructor)
12. The default access for members of a class is _________. (private)
13. Member functions of a class are normally made ________ and data members of a class are
normally made ________. (public, private)
14. Inheritance enables _______ which saves time in development , and encourages using
previously proven and high quality software. (reusability)
15. The three member access specifiers are ________, ________ and _________. (public,
private, protected)
16. A class is called as abstract base class if it has a ________function. (pure virtual)
17. A queue is _______ list. (linear)
18. A ______ is a function that invokes itself. (Recursion)
19. Run-time or dynamic allocation of memory may be done using the C++ operator _____.
(new)
20. Operator overloading permits to extend the applicability of existing C++ operators so that
they work with new ________ or ________. (data types, objects)

Answers:
1. D) All of the above 2. A) AVL tree
3. C) Implementation level 4. A) Last in first out
5. C) True, True 6. D) None of above
7. D) None of the above 8. A) push, pop
9. B) Queue 10. A) Stack

TEEGALA KRISHNA REDDY ENGINEERING COLLEGE

II B.TECH I SEMESTER II MID EXAMINATIONS (ACADEMIC YEAR 2013-14)

SUBJECT: DATA STRUCTURE (IT )

Date of Exam: Time:10.00 am to 11.30 am Max. Marks: 10

Answer any TWO Questions from the following 2*5=10

1. State the rules to be followed during infix to postfix conversions?


2. Create a maxheap for the following list of numbers:
5,18,20,9,4,15,10,30,8,45,2,22,55,63,14,72,17
3. What is a threaded binary tree? Explain with an example how threads are mapped.
4. What is a binary tree? What are its properties?

Choose the correct answer

1. Which data structure allows deleting data elements from and inserting at rear?
A) Stacks B) Queues
C) Dequeues D) Binary search tree

2. Which of the following data structure can't store the non-homogeneous data elements?
A) Arrays B) Records
C) Pointers D) Stacks
3. A ....... is a data structure that organizes data similar to a line in the supermarket, where
the first one in line is the first one out.
A) Queue linked list B) Stacks linked list
C) Both of them D) Neither of them
4. Which of the following is non-liner data structure?
A) Stacks B) List
C) Strings D) Trees

5. Herder node is used as sentinel in .....


A) Graphs B) Stacks
C) Binary tree D) Queues

6. Which data structure is used in breadth first search of a graph to hold nodes?
A) Stack B) queue
C) Tree D) Array

7. Identify the data structure which allows deletions at both ends of the list but insertion at
only one end.
A) Input restricted dequeue B) Output restricted qequeue
C) Priority queues D) Stack

8. Which of the following data structure is non linear type?


A) Strings B) Lists
C) Stacks D) Graph

9. Which of the following data structure is linear type?


A) Graph B) Trees
C) Binary tree D) Stack

10. To represent hierarchical relationship between elements, Which data structure is


suitable?
A) Dequeue B) Priority
C) Tree D) Graph
Fill in the blanks

11. A _______ is a set of instance or values. (object)


12. A _______ is a linear list in which additions and deletions take place ate the same end.
(stack)
13.A tree node with no children is called a _______ node. (leaf)
14. The shape of a binary tree if determined by the order in which values are inserted. (True)
15.Ininorder traversal, the nodes data is processed first, then the left and right nodes are
visited. (True)
16. The STL stack container is an adapter for the ______, ________, and _________ STL
containers. (vectors, lists, deques)
17. A data structure that point to an object of the same type, as itself is known as a __________
data structure. (self-refrential)
18. After creating a linked lists head pointer, one should make sure it points to _______ before
using it in any operations.(NULL)
19. __________ a node means adding it to a list, but not necessarily to the end. (inserting)
20. In a ________ list, the last node has a pointer to the first node. (circular).

Answers:
1. B) Queues 2. A) Arrays
3. A) Queue linked list 4. D) Trees
5. C) Binary tree 6. B) queue
7. A) Input restricted dequeue 8. D) Graph
9. D) Stack 10. C) Tree
6.2 UNIT TEST QUESTION PAPERS

6.2.1 UNIT TEST QUESTIONS

UNIT TEST-1

1 Define Linked List? Explain the operations on Linked List?


2 Convert the following infix expression to postfix form ( (A-(B+C)*D) $ (E+F) )
3 A) What is binary tree ADT? Explain about representation of binary tree using arrays
B) Explain about representation of binary tree using linked list
4 A)Explain quick sort technique with example B)Explain radix sort technique with
example
5 What are applications of binary tree
6 Define the following terms a) LRRimbalance b)LLR imbalance
7 Comparison between search tree & AVL trees
8 Write the differences between Linked list & Array?

UNITTEST-2

1. Define Circular Linked List? Explain the operations on Circular Linked List?
2. Define sparse Matrices & Explain the Linked representation of Sparse Matrix?
3. Define Time Complexity ? Write an algorithm to find smallest element in array of
integers & analyze its Time Complexity
4. Define two-dimensional array with an example program
5. Define Sparse Matrices
6. Evaluate the following postfix expression 123+* 7.
7. What are the various applications of stack
8. A)Describe Splay Trees b)Describe Red Black Trees
6.2.2 ASSIGNMENT QUESTIONS

ASSIGNMENT1

1 What are the different features of c++?


2 Define Double Linked List? Explain the operations on Double Linked List?
3 Define Recursion? Explain design methodology & imp of recursive of algorithm?
4 Define Stack ADT? Explain the operations in stackusing Linked list with an example
program
5 Explain the following terms i) Adjacency Matrix of graph. ii) Adjacency list of graph
ASSIGNMENT2

1. Explain Inline function?


2. Define the following terms .a)Root b)parent node c)child node d)leaf node
3. A)Explain about linear search with program B)Explain about binary search.
4. Define hash table
5. Define hashing & hash function

ASSIGNMENT3

1 Explain inheritance in C++ and name the different types of inheritance?


2 What is the purpose of binary search tree? Explain the operations in binary search tree.
3 Define AVL trees. Define Balance factor
4 Define LR Rotation with example
5 Define Abstraction & ADT

ASSIGNMENT4

1 Explain about friend function?


2 Difference between recursion & iteration?
3 Write about the structures of node in circular linked list?
4 Write an algorithm to convert infix to postfix expression?
5 Define Expression? What are types of expression?

ASSIGNMENT5

1 Explain about function overloading


2 Write about the classification of Data Structures
3 Differences between single & double linked list
4 Define push & pop operations
5 Write an algorithm for insertion & deletion of node in the heap
Answers------Hard copy available
7. ATTENDANCE REGISTER
Hard copy available
8. CD/DVD (All Course Information - like NPTEL, MIT lectures, Unit wise PPT Slides etc.,)

You might also like