0% found this document useful (0 votes)
10 views4 pages

DATASTRUCTUREALGORITHMS-2018 3rdsem

Uploaded by

shivamscse2022
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)
10 views4 pages

DATASTRUCTUREALGORITHMS-2018 3rdsem

Uploaded by

shivamscse2022
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/ 4

C S/B.T ech/C S E lIT/Ottit/S EM-3 /C S. 302nU A.

I 9

Mlllr

m
IAUL l<^tAt/t lzao
lra\rEtarE 0f IEcltto(aol

*V+,
MAULANA ABUL KALAM AZAD UNrynnsTTy oT
TECHNoLoGY, WEST BENGAL
Paper Code : CS.302
DATA STRUCTURE AND ALGORITHM
Time Allotted: 3 Hows Fuil Martcst T0
The figures in the margin indicate full marks.
Candidates are required to give their answers in their own words
as far as practicable.

Group - A
(Multlple Cholce Type Quesdons)

1. Choose the conpct altemative for the following: lx 10=10

(i) Maximum possible height of an AVL Tree with 7 node is

t2
(a) O) 4
(c)5 (O3
(ii) In a circularly linked list organization, insertion of a node involves the modification of
(a) no pointer (b) I pointer
(c) 2 pointers (d) 3 pointers

(iii) A B-nee is
(a) always balanced (b) an ordered hee

(c) adirected hee (d) All of these

(iv) Number of nodes in a complete binary tree of depth /c is

(a) 2k $) 2k
(c) zk -t (d) None ofthese

t096 Turn Over


C S/B.TecWC SE/IT/O dd/SEM - 3/C S - 3 02/20 I I-I 9

(v) To make a queue empty, elements can be deleted till


(a) front=rear+l (b) front=rear-l
(c) front=ear (d) None of these

(vi) BFS constructs

(a) a minimal cost spanning $aph.


tree of a (b) a depth first spanning tree of a graph'

(c) a breadth first spanning tree ofa gmph. (d) None ofthese

(vii) A vertex of in-degree zero in a directed graph is called

point
(a) Articulation (b) Sink

(c) Isolated matrix (d) Root vertex

(viii) In a height balanced tree the heights of two sub-trees of every node never differ by more than

(a)2 O)0
(c) 1 (d) -1

(ix) Inserting a new node after a specific node in a doubly linked list requires

(a) four pointer exchanges. (b) two pointer exchanges'

(c) one pointer exchanges. (d) no pointer exchanges'

(x) A non-planar graph with minimum number of vertices has

(a) 9 edges,6vertices (b) 6 edges,4 vertices

(c) 10 edges, 5 vertices (d) 9 edges,5 vertices

GrouP -B
(Short Answer Type Questions)
Answer any three of the following. 5x3=15

2. Write an algorithm for inorder traversal of a threaded binary tree.

3. Compare and contrast linked list with static and dynamic array.

4. Write an algorithm to insert a data X immediately before a specific data item Y in a single linked list.

5. What is Load Factor? Why do we need hashing? How does a hash table allow O(1) searching? Why is a
prime number chosen for computing a hash function? 1+1+2+1=5
C S/B.Te c WC S E/IT/O tuUS EM - 3 /C S - 3 02D 0 I 8 - I 9

Insert the following keys into a B-Tree ofgiven order mentioned below:

a, f, b, k, h, m, e, s, r, c. (Order 3)

a, g, I b, k, d, h, m, j, e, s, I, r, x, c, l, n, t, u, p. (Order 5)
2+3=5

Group - C
(Long Answer Type Questions)
Answet an! three of the following. 15x.3=45

7. what are sparse matrices? How such a matrix is represented in memory? what
are the types of sparse
matrices?
Show that the function f(n) defined by
f(l) = 1
f(n) = f11p11 * l/n for n>1, has the complexity O (log n)
Let the size of the elements stored in an 8x3 matrix be 4 bytes each. If the base
address of the matrix is
3500, then find the address of A t5,21for both row major and column major
cases. 2+2+z+4+5=ls
E. (a) What do you mean by extemal sorting? How does it differ from
intemal sorting?
(b) write an algorithm for sorting a list numbers in ascending
order using selection sort technique.
(c) Describe Kruskal's minimal spanning ree algorithm.
3+7+5=15

9' What is expression tree? Draw the expression tree and write the In, Pre
& posrorder traversals for the
given expression tee: E (2x + y) (5a
= -b)3. Prove that the number of odd degree vertices in a graph is
always even. Apply BFS/DFS Algorithms and find out the path of the given graph:

2+2+l+l+1+3+5=15
C S/B.Te c h/C S E/TI/O ild/SE M - 3 /C S - 3 02 n U 8' I 9

10. (a) Define circular queue.

(b) Write an algorithm to insert an item in circular queue.

(c) What is input restricted dequeue?


(d) write an algorithm o convert an infix expression o postfix using stack. ,*5*214=15

11. Write short noles on any three of the following: 5x3=15

(i) AVL Tree


(ii) Heap Sott
(iii) DFs
(iv) Tail rccursion
(v) Binary Search Tree

You might also like