Vous êtes sur la page 1sur 5

A6-R3: DATA STRUCTURE THROUGH C LANGUAGE

NOTE:
1. There are TWO PARTS in this Module/Paper. PART ONE contains FOUR questions and
PART TWO contains FIVE questions.
2. PART ONE is to be answered in the TEAR-OFF ANSWER SHEET only, attached to the
question paper, as per the instructions contained therein. PART ONE is NOT to be answered
in the answer book.
3. Maximum time allotted for PART ONE is ONE HOUR. Answer book for PART TWO will be
supplied at the table when the answer sheet for PART ONE is returned. Howeer,
candidates, who complete PART ONE earlier than one hour, can collect the answer book for
PART TWO immediately after handin! oer the answer sheet for PART ONE.
TOTAL TIME: 3 HOURS TOTAL MARKS: 100
(PART ONE 40; PART TWO 60)
PART ONE
(An!"# $%% &'" ()"&*+n,
1- E$.' ()"&*+n /"%+! 0*1" $ 2)%&*3%" .'+*." +4 $n!"#- C'++" &'" 2+& $33#+3#*$&"
+n" $n5 "n&"# *n &'" 6&"$#-+447 $n!"# '""& $&&$.'"5 &+ &'" ()"&*+n 3$3"#8 4+%%+!*n0
*n&#).&*+n &'"#"*n- (1 9 10,
"." #p$ is a pointer to the structure. A member #mem$ of that structure is referenced by
A% &p.mem
'% (&p%.mem
)% &(p.mem%
*% +one of the aboe
"., -hich one is not correct.
A% Pointers are used for dynamically allocatin! memory.
'% *ynamic memory allocation is preferred when stora!e requirement is not predictable.
)% *ata access in dynamically allocated stora!e is faster than static allocated stora!e.
*% +one of the aboe
"./ -hich of the followin! cannot be performed recursiely.
A% 'inary 0earch
'% 1uick 0ort
)% *epth 2irst 0earch
*% +one of the aboe
".3 -hich of the followin! types of expression does not require precedence rules for ealuation.
A% 2ully parenthesi4ed infix expression
'% 5ri!inal Prefix expression
)% Partially parenthesi4ed infix expression
*% +one of the aboe
".6 7n a binary tree, the number of terminal or leaf nodes is "8. The number of nodes with two
children is9
A% :
'% ""
)% "6
*% ",
A6-R3 P$0" 1 +4 : ;)%<8 =00>
".; -hich of the followin! is a hash function.
A% 1uadratic Probin!
'% )hainin!
)% 5pen addressin!
*% 2oldin!
".< 7f the inorder and preorder traersal of a binary tree are *, ', 2, =, >, H, A, ) and A, ', *, =, 2,
>, H, ) respectiely then, the postorder traersal of that tree is 9
A% *, 2, >, A, ', ), H, =
'% 2, H, *, >, =, ', ), A
)% ), >, H, 2, = *, ', A
*% *, 2, H, >, =, ', ), A
".? -hich of the followin! is not correct.
A% f(n% @ 5 (f(n%%
'% c&f(n% @ 5 (f(n%% for a constant c
)% 5 (f(n% A ! (n%% @ f(n% A 5 (! (n%%
*% 5 (f(n%
,
% @ 5 (f(n%%
,
".: >ien , sorted lists of si4e #m$ and #n$ respectiely. The number of comparisons needed in the
worst case by mer!e sort will be
A% Min (m, n%
'% m&n
)% m A n B"
*% Max ( m, n%
"."8 A 'Ctree of order m is an mCway tree in which all internal nodes except the root hae at most
now empty children
A% mC"
'% m
)%

2
m

*%

2
m
A6-R3 P$0" = +4 : ;)%<8 =00>
=- E$.' &$&"2"n& /"%+! * "*&'"# TRUE +# FALSE- C'++" &'" 2+& $33#+3#*$&" +n" $n5
ENTER *n &'" 6&"$#-+447 '""& $&&$.'"5 &+ &'" ()"&*+n 3$3"#8 4+%%+!*n0 *n&#).&*+n
&'"#"*n- (1 9 10,
2.1 7ntroducin! interfaces can help to eliminate dependences.
2.2 0equence dia!ram is a tool used to depict the sequence and ariation of screens.
2.3 *eCreferencin! operator & has the same effect when it is applied to a pointer, a structure or a union.
,.3 7n an empty threaded binary tree the ri!ht link of the head is a thread to itself.
2.5 Array is linear data structure.
,.; 7nsertion in and deletion from an array does not inole physical moement of elements of the
arrays.
2.7 The adDacency matrix correspondin! to a !raph consistin! of #n$ nodes but no ed!es is a unit
matrix.
,.? Eecursion cannot be remoed without usin! a stack.
,.: 7f an AFG tree has n items then its hei!ht is lo! n.
,."8The aera!e sequential successful search time for a sequential file hain! #n$ records is (nA"%/,.
3- M$&.' !+#5 $n5 3'#$" *n .+%)2n ? !*&' &'" .%+"& #"%$&"5 2"$n*n0@ !+#5(,@3'#$"(, *n
.+%)2n A- En&"# <+)# "%".&*+n *n &'" 6&"$#-+447 $n!"# '""& $&&$.'"5 &+ &'" ()"&*+n
3$3"#8 4+%%+!*n0 *n&#).&*+n &'"#"*n- (1 9 10,
? A
/." )ircular list A- *ata structure for backtrackin!
/., Pointer B- Hei!ht 'alanced Trees
/./ 2orest C- 0tatic Tree Table
/.3 Tree D- )ollision Eesolution
/.6 Pendant ertex E- Most sparse AFG Tree
/.; AFG Trees F- *ynamic =nironment
/.< Eehashin! G- Pattern Matchin!
/.? 2ibonacci Tree H- 0hell 0ort
/.: 2inite Automata I- Hsed in 0parse Matrix
/."8 *iide and )onquer ;- 5rdered set of ordered trees
K- Mer!e 0ort
L- *ynamic *ata 0tructure
M- A Fertex with de!ree "
A6-R3 P$0" 3 +4 : ;)%<8 =00>
C- E$.' &$&"2"n& /"%+! '$ $ /%$nD 3$." &+ 4*& +n" +4 &'" !+#5(, +# 3'#$"(, *n &'" %*&
/"%+!- En&"# <+)# .'+*." *n &'" 6&"$#-+447 $n!"# '""& $&&$.'"5 &+ &'" ()"&*+n 3$3"#8
4+%%+!*n0 *n&#).&*+n &'"#"*n- (1 9 10,
A- Go!,n B- 2loor (lo!, (n% A"% C- 2loor ( lo!, (n A "%%
D- nC" E- + F- 2aster
G- 0lower H- Gess than I- More than
;- / K- , L- 1ueue
M- 0tack N- Many C to C many O- 5neCtoCmany
P- 0tora!e 0tructure E- +on recursie R- recursie
4.1 Time complexity of insertin! an element in a heap of #n$ elements is of the order of IIIIIIII.
4.2 'est fit approach is !enerally IIIIIIII than first fit approach for memory allocation.
4.3 Eepresentation of data structure in memory is known as IIIIIIII.
4.4 A !raph represents IIIIIIII relationship between nodes.
4.5 The depth of a complete binary tree with JnK nodes is IIIIIIII.
4.6 A tree is a cycle free undirected !raph with n ertices and IIIIIIII ed!es.
4.7 0pace required to store an adDancy matrix is IIIIIIII that to store the adDancy list of a dense
!raph.
4.8 +umber of positions where the second lar!est elements of a heap may be stored is
IIIIIIII.
4.9 )onersion of infix arithmetic expression to postfix expression requires the use of IIIIIIII.
4.10 The minimum number of ed!es in a connected cyclic !raph of JnK ertices is IIIIIIII.
A6-R3 P$0" C +4 : ;)%<8 =00>
PART TWO
(Answer any FOUR questions%
:-
a% 7f A(n% @ am n
m
A am B" n
m C"
A CCCCCCCCCCCCCC A a"n A a8 is a polynomial of de!ree n, then show that
A(n% @ 5 (n
m
%, where 5 stands for bi! B oh notation.
b% -rite a J)K function to add two polynomials usin! arrays.
(FG>,
6-
a% )onsider a linked list with a pointer pointin! to its head. -rite a J)K function to insert a node to
the front of the list, after the last node, in between the list.
b% -rite a J)K function to copy one stack to another assumin! the stack is implemented usin!
linked list.
(FG>,
F-
a% -rite a J)K function to count the number of nodes in a binary tree.
b% -hat do you mean by hei!ht balanced binary search tree. -rite the steps for conertin! a
!eneral binary search tree into a hei!ht balanced tree.
c% Proe that a binary tree with n internal nodes has (nA"% external nodes.
(:G:G:,
>-
a% )reate a 'Ctree of order 6, when the keys arrie in the followin! order
a, f, !, b, k, d, m, D, e, s, i, x, r, y, c
b% )reate a binary search tree when the elements arrie in the followin! order
"8, 6, ,8, <, ,:, "", ,/, ,:, "/, ",
c% -hat do you mean by threaded binary tree. >ie an example.
(>G:G=,
H-
a% -hat do you mean by a spannin! tree. )reate a minimal spannin! tree for the followin!9
"6
"; "?
"8 ,8 ",
"< ,8
,6
b% -rite a ) function for bubble sort. Hence, !iin! intermediate lists, sort the followin!9
"", "8, ",, ?
(FG>,
A6-R3 P$0" : +4 : ;)%<8 =00>

Vous aimerez peut-être aussi