Skip to content
Previous Year Question Paper

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

November 2022AIMLSEMESTER-3
November 2022
Max Marks: 70
Duration: 3 Hours
Instructions:

Attempt any five questions.

All questions carry equal marks.

Q.1
a)Unit 1

Mention the types of data. Write all built-in data types in C.

b)Unit 1

What do you mean by data structure and mention its types?

Q.2
a)Unit 1

What do you mean by an algorithm? Write the criteria and characteristics of an algorithm.

b)Unit 1

Demonstrate the efficiency of an algorithm.

Q.3
a)Unit 3

Draw an AVL tree on following inputs, assume that tree is initially empty: 485, 575, 655, 745, 830, 910, 100, 110, 520, 130, 340, 450, 365, 525, 204, 155, 130, 35.

b)Unit 4

Compare and Contrast the Spanning tree and Minimum Spanning Tree.

Q.4
a)Unit 4

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.

b)Unit 4

Reconstruct the proof of correctness of the Bellman-Ford Algorithm. How Bellman-Ford algorithm able to work with negative weight?

Q.5
a)Unit 1

Determine the addressing formula to find the location of (i,j)th element of an m×n matrix stored in column-major order. 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)Unit 1

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.

Q.6
a)Unit 4

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. Adapt either Kruskal's or Prim's algorithm to work on a graph that may include negative weights.

b)Unit 5

Explain heap and radix sort with the algorithm.

Q.7
a)Unit 1

How to measure the complexity of an algorithm, also discuss various types of notation for this purpose?

b)Unit 1

How doubly linked list is better than a linked list? Justify with examples.

Q.8
a)Unit 4

Draw the directed graph that corresponds to the given adjacency matrix.

b)Unit 1

Explore all types of operations that can be performed on a linked list.