AD/AG/AL/CD/CY/IO/IS-303 (GS) – Data Structure

B.Tech. III Semester
Examination, November 2022
Grading System (GS)
Max Marks: 70 | Time: 3 Hours

Note:
i) Answer any five questions.
ii) All questions carry equal marks.

Previous Year Questions (November 2022)

Q.1

a) Mention the types of data. Write all built-in data types in C. (Unit 1)


b) What do you mean by data structure and mention its types? (Unit 1)


Q.2

a) What do you mean by an algorithm? Write the criteria and characteristics of an algorithm. (Unit 1)


b) Demonstrate the efficiency of an algorithm. (Unit 1)


Q.3

a) Draw an AVL tree on following inputs, assume that tree is initially empty: (Unit 3)

485, 575, 655, 745, 830, 910, 100, 110, 520, 130, 340, 450, 365, 525, 204, 155, 130, 35


b) Compare and Contrast the Spanning tree and Minimum Spanning Tree (Unit 4)


Q.4

a) Design an efficient algorithm for finding the longest directed path from a vertex s to a vertex of an acyclic weighted digraph G. Specify the graph representation used and any auxiliary data structures used. Analyze the time complexity of your algorithm. (Unit 4)


b) Reconstruct the proof of correctness of the Bellman-Ford Algorithm. How Bellman-Ford algorithm able to work with negative weight? (Unit 4)


Q.5

a) Determine the addressing formula to find the location of $(i,j)^{th}$ element of an $m \times n$ matrix stored in column-major order. (Unit 1)

Consider the linear arrays AAA [5:50], BBB[-5:10] and CCC[1:8]

i) Find the number of elements in each array.

ii) Suppose base $(AAA)=300$ and $w=4$ words per memory cell for AAA. Find the address of AAA [15], AAA[35], and AAA[55].


b) What is a singly linked list? Write its advantage and application and explain its node structure. Write the algorithm and program in C to create and traverse a singly linked list. (Unit 1)


Q.6

a) The problem of finding a subset T of the edges of a connected graph G such that all nodes remain connected when only the edges of T are used, and the sum of weights of edges in T is as small as possible, still makes sense even if G has edges with negative weights. However, the solution may no longer be a tree. Adapt either Kruskal's or Prim's algorithm to work on a graph that may include negative weights. (Unit 4)


b) Explain heap and radix sort with the algorithm. (Unit 5)


Q.7

a) How to measure the complexity of an algorithm, also discuss various types of notation for this purpose? (Unit 1)


b) How doubly linked list is better than a linked list? Justify with examples. (Unit 1)


Q.8

a) Draw the directed graph that corresponds to the following adjacency matrix. (Unit 4)

Vertices V0 V1 V2 V3
V0 0 1 1 0
V1 0 0 1 1
V2 0 0 0 1
V3 1 0 0 0

b) Explore all types of operations that can be performed on a linked list. (Unit 1)