Data Structure Previous Question Paper
Data Structure Previous Question Paper
R16
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
B.Tech II Year I Semester Examinations, November/December - 2017
DATA STRUCTURES THROUGH C++
(Common to CSE, IT)
Time: 3 Hours Max. Marks: 75
PART- A
(25 Marks)
1.a) Define Time Complexity. [2]
b) What is a copy constructor? [3]
c) Define a node of Single linked list in C++. [2]
d) With a neat diagram represent 4 elements (21, 30, 12, 11) in Circular linked list. [3]
e) Define node of a threaded binary tree. [2]
f) Define height of a binary tree. [3]
g) Write worst case time complexity of quick sort. [2]
h) Define Collision in hashing. [3]
i) Define Red black tree. [2]
j) Differentiate between directed and Undirected graph. [3]
PART-B
(50 Marks)
2.a) Write a C++ program to swap two numbers using function templates.
b) Differentiate between function overloading and function overriding. [5+5]
OR
3.a) Write a C++ program to overload + operator to concatenate two strings.
b) Define big- O notation and theta notation? Give examples. [5+5]
WWW.MANARESULTS.CO.IN
8.a) Write a C++ Program to search an element using binary search.
b) Trace the above program to search 23 in the following elements 12, 15, 18, 20, 22, 36,
39, 40, 46 which is unsuccessful search. [5+5]
OR
9.a) Write a C++ program to sort the following elements using Recursive Merge Sort.
b) Trace the above program for the following elements:
12, 22, 54, 19, 11, 84, 63, 17, 15, 4, 13 [5+5]
10.a) Create binary search tree for the following elements ( 23, 32, 24, 36, 15, 12, 39, 2, 19).
Discuss about the height of the above binary search tree.
b) Discuss about different ways of representing Graphs in memory. [5+5]
OR
11.a) Write an algorithm to traverse a graph using breadth first search.
b) Explain about adjacency matrix and adjacency list. [5+5]
---oo0oo---
WWW.MANARESULTS.CO.IN