0% found this document useful (0 votes)
18 views3 pages

Data Structure and Algorithms

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views3 pages

Data Structure and Algorithms

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Course Code : CSTM 41 QVRU/RS – 22 / 1229

Fourth Semester Bachelor of Technology ( Minor ) Examination

DATA STRUCTURES AND ALGORITHMS

Time : 3 Hours ] [ Max. Marks : 60

Instructions to Candidates :—
(1) Make proper assumptions wherever necessary.
(2) All questions carry marks as indicated against them.
(3) Illustrate answers with examples wherever necessary.

1. (a) Write a 4 x 4 matrix and represent it in row - major and column major formats.
Also find the address of A[2][3] if A[0][0] = 3000. 5 (CO 1)
(b) What is the significance of different asymptotic notations ?
Represent the given function using Big O, Theta and Omega notations.
Function : 6 y 2n + n2. 5 (CO 1)

2. (a) Write an algorithm for insertion and deletion of element from Queue.
Perform the following operations using Queue data structure. Consider the
maximum number of elements that the queue can accommodate as 3 :
Delete( ), Insert(10), insert(3), insert(5), insert(8), delete( ), insert(20).
5 (CO 2)
(b) Perform infix to postfix conversion using stack data structure :
5 + 6 – 2 y 12/4
Also evaluate the obtained postfix expression using stack. 5 (CO 2)

3. (a) Write a C program or algorithm to insert a node (1) at the beginning,


(2) at a position after a node with a value VAL is found in a singly
linked list. Also show the trace using some examples. 6 (CO 2)
(b) What are the advantages of circular and doubly linked list ? Explain with
examples. 4 (CO 2)

QVRU/RS-22 / 1229 Contd.


4. (a) Write an algorithm to perform shell sort. Also illustrate it with an example.
5 (CO 3)
(b) Illustrate the procedure to perform insertion sort and perform sorting using
insertion sort for the given numbers. Show all intermediate steps :
26 54 93 10 70 35 45 65 22 5 (CO 3)

5. (a) Give the in - order, pre - order and post - order traversal for the given Binary
Search Tree.

5 (CO 4)
(b) What are the advantages of B+ tree ? Using an example show how insertion
is performed in a B+ tree and how traversal is performed ? 5 (CO 4)

6. (a) Represent the given undirected graph using Adjacency matrix and Adjacency
list representation.

4 (CO 4)

QVRU/RS-22 / 1229 2 Contd.


(b) For the given weighted graph, obtain the minimum cost spanning tree of
the graph employing Prim's approach. Show the tree at each step.

6 (CO 4)

QVRU/RS-22 / 1229 3 55

You might also like