JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD

JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD B.Tech II Year DATA STRUCTURES Previous Question Paper (February - 2024 - R15)

B.Tech | II Year | I Semester | R15 | February - 2024

Answer PaperPaper Code: 123BPMaximum Marks: 75Time: 3 Hours

Note: i) Question paper consists of Part A, Part B. ii) Part A is compulsory, which carries 25 marks. In Part A, answer all questions. iii) In Part B, Answer any one question from each unit. Each question carries 10 marks and may have a, b as sub questions.

Part A

125 marks
a

What is sparse matrix? Show array representation of a sparse matrix.

2 marks

Answer

A sparse matrix is a matrix in which the number of zero elements is significantly higher than the number of non-zero elements. It is represented using a 2D array of size (n+1) x 3, where the first row stores the total number of rows, columns, and non-zero values, and subsequent rows store the triplet (row_index, column_index, value) for each non-zero element.

b

What is amortized complexity? Discuss briefly.

3 marks

Answer

Amortized complexity is the average time taken per operation over a worst-case sequence of operations. Unlike average-case analysis, which relies on probability, amortized analysis guarantees the average performance of each operation in the worst case, ensuring that occasional expensive operations are offset by a large number of cheap ones.

c

What is an ADT? Write stack ADT.

2 marks

Answer

Sign in to view the complete answer paper.

d

What is Deque? Indicate how deque is represented in C.

3 marks

Answer

Sign in to view the complete answer paper.

e

Define strictly binary tree. Give example.

2 marks

Answer

Sign in to view the complete answer paper.

f

Explain adjacency matrix representation of a graph with example.

3 marks

Answer

Sign in to view the complete answer paper.

g

What is Hash table?

2 marks

Answer

Sign in to view the complete answer paper.

h

What is sorting? What is searching?

3 marks

Answer

Sign in to view the complete answer paper.

i

Define AVL tree.

2 marks

Answer

Sign in to view the complete answer paper.

j

What are splay trees?

3 marks

Answer

Sign in to view the complete answer paper.

Part B

2

Give the node structure to create a linked list of integers and write C functions to perform the following:

10 marks
a

Create a three node list with data 11, 22, and 33.

3 marks

Answer

Sign in to view the complete answer paper.

b

Insert a node with data value 15 in between the nodes 11 and 22.

3 marks

Answer

Sign in to view the complete answer paper.

c

Display the resulting singly linked list.

4 marks

Answer

Sign in to view the complete answer paper.

OR
310 marks
a

Explain different types of linked lists with diagram.

5 marks

Answer

Sign in to view the complete answer paper.

b

Write a C program to insert a node into a doubly linked list.

5 marks

Answer

Sign in to view the complete answer paper.

410 marks
a

Discuss the various exceptional conditions that should be handled while using stacks.

5 marks

Answer

Sign in to view the complete answer paper.

b

Convert the following postfix expressions to infix expressions: i) A B C D E / * - F / G + + ii) a b c d g / * + +.

5 marks

Answer

Sign in to view the complete answer paper.

OR
510 marks
a

Define stack and write functions for operations over stack.

5 marks

Answer

Sign in to view the complete answer paper.

b

Write a C program to reverse a string using stack.

5 marks

Answer

Sign in to view the complete answer paper.

6

Explain insertion and deletion from a Max Heap with examples.

10 marks

Answer

Sign in to view the complete answer paper.

OR
710 marks
a

Write a C program to implement BFS.

5 marks

Answer

Sign in to view the complete answer paper.

b

Write C functions for the following tree traversals: i) In order ii) Pre order iii) Post order.

5 marks

Answer

Sign in to view the complete answer paper.

810 marks
a

Apply heap sort on the following list of elements: {14, 12, 9, 8, 7, 10, 18, 20, 30}

5 marks

Answer

Sign in to view the complete answer paper.

b

What is hash function? Explain different hash functions with example.

5 marks

Answer

Sign in to view the complete answer paper.

OR
9

Analyze input (371, 325, 163, 199, 344, 679, 989, 534, 448, 355) and the hash function is h(x) = x mod 10. Show the result using quadratic probing and double hashing h2(x) = 7 – (x mod 7).

10 marks

Answer

Sign in to view the complete answer paper.

1010 marks
a

Construct a b-tree of order 3 for the following: {5, 3, 21, 9, 1, 13, 2, 7, 10, 12, 4, 8}

5 marks

Answer

Sign in to view the complete answer paper.

b

Explain about Red-Black trees.

5 marks

Answer

Sign in to view the complete answer paper.

OR
11

Explain different types of AVL rotations with example.

10 marks

Answer

Sign in to view the complete answer paper.

About this paper

This page contains the question paper of DATA STRUCTURES from JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD for B.Tech ECM II Year I Semester, February - 2024, R15.

For the solved question paper with answers, switch to the Answer Paper tab.

Other papers in DATA STRUCTURES

Loading Question Papers

Fetching data from database...