CS 302 (3001 (O) ) PDF
CS 302 (3001 (O) ) PDF
CS 302 (3001 (O) ) PDF
htt
Roll No. : ………………………………………………………...
Invigilator's Signature : ……………………………………….
CS/B.Tech/ECE(O),EE(O),EEE(O),ICE(O),CSE(O),IT(O)/
p:/
SEM-3/CS-302/2011-12
2011
DATA STRUCTURE AND ALGORITHMS
/q
Time Allotted : 3 Hours Full Marks : 70
GROUP – A
( Multiple Choice Type Questions )
er.
vertices is
a) n(n–1) b) n ( n – 1 )/2
ut .
c) n2 d) 2 n – 1.
implement recursion ?
a) Arrays b) Stacks
iii) In what tree, for every node the heights of its left sub-
htt
tree and right sub-tree differ at least by one ?
b) AVL tree
p:/
c) Complete tree
a) Post-order b) Pre-order
a) defbc/++ b) def+/bc+ ∗
string is
(A–(B+C))∗ D
ut .
a)
b) ((A–B)+C)∗ D
a c.
c) ((A+B)–C)∗ D
d) ( A + ( B – C ) ∗ D ).
in
3001-(O) 2
CS/B.Tech/ECE(O),EE(O),EEE(O),ICE(O),CSE(O),IT(O)/SEM-3/CS-302/2011-12
push(1),push(2),pop,push(1),push(20,pop,pop,pop,
(push(2),pop.
p:/
The sequene of popped out values is
a) 2, 2, 1, 2, 1 b) 2, 2, 1, 1, 2
/q
c) 2, 1, 2, 2, 1 d) 2, 1, 2, 2, 2.
pap
viii) A linear collection of data elements where the linear
structure is referenced by
wb
a) ∗p.mem b) (∗p).mem
d) none of these.
in
d) none of these.
/q
xii) An adjacency matrix representation of a graph cannot
contain information of
pap
a) nodes b) edges
GROUP – B
( Short Answer Type Questions )
er.
representations. Given
a c.
3001-(O) 4
CS/B.Tech/ECE(O),EE(O),EEE(O),ICE(O),CSE(O),IT(O)/SEM-3/CS-302/2011-12
5. a) Define O ( f ( n ) ), Ω ( g ( n ) ) and Θ ( h ( n ) ).
htt
b) Let f ( n ) = 4 n 2 – 5 n + 6 and g ( n ) = n 2
ii) Reverse the links of the list i.e. the first node
becomes last node.
wb
2+3+1
Pre-order : A B C D E F G H I
In-order : B C A E D G H F I
er.
2+2+3
A∗(B+D)/E–F∗(G+H/K) X 5+3
in
3001-(O) 6
CS/B.Tech/ECE(O),EE(O),EEE(O),ICE(O),CSE(O),IT(O)/SEM-3/CS-302/2011-12
value n ?
expression : 4
( ( ( a + b ) ∗ c ) – ( d / ( a + b ) ) ) ≠ ( ( a + b ) ∗ c ).
in