30
Total No. of Questions : 10 J I Total No. of Printed Pages : 4 Roll :'010•••••• ..•.•.••••••••••••• MCA-203 M. C A. (Second Semester) EXAM INATION, June, 2008 DATA S TR UCI1JRES (:\t CA - 103) TIme : Three Hours Maximum Marks : J()() Minimum fuss Marks: 40 Note : Quest ion pap er is divided into fi ve Units. Attempt one question from each Unit. All questions carry equal marks. Uni l-I 1. (3) List and explain the applications of Slack in computers. 10 (b) Translate the following infix expression into its equivalent postfix forms: 2 eac h (i) A * (B +D)l E- F - (G + I IIK) (ii ) (A + B t D)/ (E - F) + G (iii ) A&& B uc u: (C> D) (iv) {(A + 8 )/ 0) f «E- F) . G) (v) A f B t C- o P. T. O. Courtesy : Bansal Institute of Science & Technology, Bhopal http://bist.dyndns.org

ucu - RGPVONLINE.COM

  • Upload
    others

  • View
    10

  • Download
    0

Embed Size (px)

Citation preview

Page 1: ucu - RGPVONLINE.COM

Total No. of Questions : 10 J I Total No. of Printed Pages : 4

Roll :'010•••••• . .•. •.•••••••••••••

MCA-203

M. C A. (Second Semester) EXAM INATION, June, 2008

DATA STRUCI1JRES

(:\t CA - 103)

TIme : Three Hours

Maximum Marks : J()()

Minimum fuss Marks: 40

Note : Question paper is divided into fi ve Units. Attempt one

question from each Unit. All questions carry equal marks.

Unil-I

1. (3) List and explain the applications of Slack in computers.

10

(b) Translate the following infix expression into its equivalent postfix forms: 2 each

(i) A * (B +D)lE - F - (G + IIIK)

(ii) (A + B t D)/ (E - F) + G

(iii ) A&& B uc u : (C> D)

(iv) {(A + 8)/0) f « E - F) . G)

(v) A f B t C- o

P. T. O.

Courtesy : Bansal Institute of Science & Technology, Bhopal http://bist.dyndns.org

user
Rectangle
Page 2: ucu - RGPVONLINE.COM

,.' [ , [ MCA-203

2, (a) What is a priority queue? What are the differen t ways

of maintaining a priority queue in memory ? 10

(b) What is the significance of linked implementation of

stack? Write insertion and de leti on algori thm for this

data structure. 10

u-u- n

3. (a ) Write an algorithm to concatentare two given linear

lists. 10

(b) Wha t is doubly linked lis! ? Compare doubly linked list and singly linked list. Write deletion algorithm for

do ubly linked list. JO

0,

4. (a) How po lynomials can be represented by linked list?

Write an algorithm to add two polynomials with two variables. 10

(b) Write steps/procedure to

info rmation from a linked list. remove duplicate

10

Unit-III

5. (a) Define the following terms. Also give examples of

each : 10

(i) Comp lete binary tree

(ii) Extended binary tree

(iii) Strictly binary tree

(iv) Expression tree

(b) Prove that the to tal number of edges in a comp lete

binary tree with n terminal nodes is 2 (n - I). 10

Courtesy : Bansal Institute of Science & Technology, Bhopal http://bist.dyndns.org

user
Rectangle
Page 3: ucu - RGPVONLINE.COM

10

[ a J MCA-203

0 , , 6. (a) Write nun-recursive preorder traversal algorithm for

binary tree. Traverse the following binary tree in prcordcr.

Fig. 1

(b) What are the applications of tree da ta structure? Explain. 10

unu- av

7. (a) Explain the following search techniques with examples :

10

(i) indexed sequential search

(ii ) interpolation search

(b) Write insertion sort algorithm. Using this method arrange the following list in ascending order: 10

25, 15, 30, 9, 99, 20, 26

0 ,

8. (a) Explain Heap son procedure with proper example. 10

(b) wr ue some collision resolution techniques. Also explain chaining. 10

P. T. O.

Courtesy : Bansal Institute of Science & Technology, Bhopal http://bist.dyndns.org

user
Rectangle
Page 4: ucu - RGPVONLINE.COM

I • J

Uni t - \'

9. <a) Which are the ,hru commonly used represemations of graph? Give examples to explain each. 10

(b) What i~ Dijkstra's Algorithm ? Using Ihis algorithm find the shonesr palm. fmm source A to all the other vertices. . to ,

Fig. 2

0 ,

10. (a) Def ine the term AVL tree. Write about various

rotations pe rformed to balance an AVL tree. Construe! an AVL search tree by inserting the following etemenu

into an empty AVL tree; 10

2, 10, 3, 9, 4. 8. 7, 5. 6

(b) Compare a -tree with B +-tree. 10

~1 CA -203 5,950

Courtesy : Bansal Institute of Science & Technology, Bhopal http://bist.dyndns.org

user
Rectangle
Page 5: ucu - RGPVONLINE.COM

Total No. of Ouestions : 10 ) r 'lbra l No. of Printed Pages: 4

MCA-203

M. C. A. (Second Semester)

EXAMINATION, June, 2007 DATA STRUCI1JRE

(MCA-203)

Time : Three Hours

Maximum Marks .. 100

Minimum Pass Marla : 40

Nole: Attempt one qu estion from each Unit, All questions

carl)' equal marks.

UnJI -1

1. (a) What is recursion ? Solve Tower of Hanoi problem by

using recursion. 10

(0) What is the procedure for calculating the add ress of _. any two-dimensional array ? Explain with the help of an example. 10

2. (a) Explain briefly an array, structure and array of st ructures. If an array 8 [Ll] [8J is stored as

celumnwise and B (2) 12) is stored at 1024 and 8 (3J (3] at 1084, find the addresses of 8 [S) [3] and BPi (II. 10

(b) Wrile an algori thm to find the VALUE of an Arithmetic expression Pinto pOS11l)( notations: to

P =C3f 2 ·S)/(3*2- 3)+S P. T. o.

• Courtesy : Bansal Institute of Science & Technology, Bhopal http://bist.dyndns.org

user
Rectangle
Page 6: ucu - RGPVONLINE.COM

.'

3. (a)

\ (b)

4. (a)

(b)

5. (a )

(b)

"

I a I MCA--203

Unit-II

Draw the picture represen tation of a polynomial function P {x) using linked list: 10

P(x) "" 2Jl - 5x7 - 3x2 +4

Write an algorithm to delete th,~ First Node N from a linked list which contain Ih-: given ITEM of information. iO

Explain the memory representation of a doubly linked Jist. 10

explain the following: 10

(I) represent linked list using array

(ii) Sparse. matrices

Uni t -III

Explain the memory representation of a binary tree with suitable example. 10

What arc basic differences between complete binary tree and almost complete binary tree? Construct the binary tree with general tree. 10

, L

,

d '

Fig. 1

Courtesy : Bansal Institute of Science & Technology, Bhopal http://bist.dyndns.org

user
Rectangle
Page 7: ucu - RGPVONLINE.COM

·.

1" 6. (a) Show thai maximum number of nodes in a binary tree

of height 'II ' is i' + 1 ­ 1, II <:= O. 10

(b) Cons truct a Binary nee T with Nine Nodes and the Inorder and Preorder 'Itaversal of T yields the following seqr euces of nodes : 10

INORDER : E, A. C. 1(, F, H, D, B, G

l'REORDER : F, A. E, K. C, D, 1-1, G, B

Unit - IV

7. (a) w", , b

the procedure example.

for shell son. Explain with to

(b) th

re .VC

e . •

orithm for Merge So t an CT1xityisD(I,Ig

also prove thai 10

d. [a) Explain Hasing Procedure. Give Jour advantages of a chained hash table over open addressing. 10

(b) What are the differences between Sequential Search and Binary Search ? Write an algorithm for binary search on linear array. 10

Unil - V

9. (a) What is Minimum Cos! Spanning 'nee ? An undirected graph G is given below. Convert into the Minimum Cost Spanning nee by using Kruskal's Algorithm. 10

"

Fig. 2 P. T. O.

Courtesy : Bansal Institute of Science & Technology, Bhopal http://bist.dyndns.org

user
Rectangle
Page 8: ucu - RGPVONLINE.COM

- --"-,--If- - ­

I • I (b) Write an Algorithm to insert the element into the

a-tree. 10

10. (a) Write the Algorithm for Breadth First Graph Traversals. Also prove the lime complexity is : 10

T(n, e) = O(n2)

(b) Construct the AVL search-tree from the given set of item values : 10

H, I, J, 13, A, E, C. F

MCA-ZOJ S.1lOO

Courtesy : Bansal Institute of Science & Technology, Bhopal http://bist.dyndns.org

user
Rectangle
Page 9: ucu - RGPVONLINE.COM

Tolal No. of Quest ions: 8 J [ Total No. of Printed Pages ; 3

MCA-203(O)

M. C. A. (Second Semester) EXAMINATION, May/June, 2006

(Old Scheme)

DATA STRUcrURE

{MCA-203 (O)l

Time ; Three Hours

Maximum Marks; ]00

Minimum 1'£m Marks : 40

~o t e: Attempt any {illt! questions. Al l questions carry equal

marks.

1. (a) How will you implement several stacks and queues with in single array? 10

(b) Write an algorithm to search a node in linked list. 10

2. (a ) Let a be the set of integers. Give recursive algorithm to compute .the maximum uml minlmum elements of

array. 10

(b) Transform eech of the following expressions 1IJ prefix

and postfix : 10

(i) A+B ' C -D

( i i) (A + B)· (C ­ D)IE* F

(Hi) A - B/{C * 0 )

P. T. o.

Courtesy : Bansal Institute of Science & Technology, Bhopal http://bist.dyndns.org

user
Rectangle
Page 10: ucu - RGPVONLINE.COM

I , I MCA-2G3jO)

3. (a) Write algorithms for the following in 3 deque : 12

( i) Remove left element of deque

(ii ) Remove right element of deque

(iii) 1I1$Crl an clement to left of dequc

(iv) Insert an element to right of deque

(b) How will you declare doubly linked list in C language? What are i15 main featu res? .8

4. (a) What is the difference between internal and external

sorting? Son the following array using heap sort: 14

42, 73, 10. 64, 23, 57, 93, 35, 98, 96

- Alw write algorithm for heap SOrt.

(b) Explain Hashing. Explain various collision handling methods. 6

5. (3) Write an algorithm to search in a B·Trcc. 10

(b) Explain sequential search, binary search. index sequential search and interpolation search. 10

6. (, ) Explain the following terms: 12

(0 Indegree of graph

( ii ) Outdegree of graph

(i ii) Weighted graph

(iv) Adjacency matrix

(v) Adjacency list

(vi) Complete graph

(b) Explain Dijkstra's algorithm for shortes t pat h in gra ph

with example. 8

7. (a) Explain 8+ trees. Compare with 8 trees. a

Courtesy : Bansal Institute of Science & Technology, Bhopal http://bist.dyndns.org

user
Rectangle
Page 11: ucu - RGPVONLINE.COM

, 1"

(b) What do you mean by forest? How will )00 convert

forest into trees? 8 (c) Explain AVL trees, 4

8. Wrile soon notes on lUlY jow of the following: 20

<i) AppliQliolD of stacn

(il) Complete binary tree

(iii) Suing proceMing

(iv) Selection sort

(v) Merge son

, ~ICA-203(O)

I -Courtesy : Bansal Institute of Science & Technology, Bhopal http://bist.dyndns.org

user
Rectangle
Page 12: ucu - RGPVONLINE.COM

Tot.al No. of Questions : 8 J [Total No. of Printed Pages : 3

MCA-203(N)

M. C. A. (Second Semester) EXAMINATION, May/June. 2006

(New Scheme)

DATA S'ffiUCTURES

fMCA- Z03 (N)]

Tune ; Three Hours

Maximum Marks: /00

Minimum Pal's Mar1cr .. 40

Note: Attem pt any five questions. All questions carry equal

marks.

1. (a) Obtain a data representation for mapp ing a stack S and a queue Q into a single array V ( I : II). Write algorithms to add and delete element, from these two data objeeu. 10

(b) Explain the term 'Recursion '. How is stack useful in

recursion? Write a recursive function to calculate the product of two integers. 10

2. (a) Transform each of the following expressions to prefix

and POSlflX form; 10

(i) A + (s_c_ (nlEhF)_G)_H

(ii) (A+B)_(C _D)lIE_F

(iii) (A+ B) - D+EI(F + A oO)+C P. T. o.

Courtesy : Bansal Institute of Science & Technology, Bhopal http://bist.dyndns.org

user
Rectangle
Page 13: ucu - RGPVONLINE.COM

(b)

3. (a)

(b,

4. (a)

(h)

f 2 I MCA-203\Nj

(iv) (A + Rj· (C~ (D - E) + F) - G

(v) A"-B+C

Write algorithms to Implemem a queue using circular

linked list having one external pointer. 10

whm are the different ways 10 represent linked list in

memory ., E>.l'laill by givi'l;!: prnper examples. A150 write the advantages and disadvantages of each type. JO

wnre algorithms to perform thc following: 10

(i) Invert a linked list pointed at by X

(ii) Concatenate reo linked lists producing a third one.

What do yro umlel'!and by Tbrced binary trees .,

Explain one-way and two-way threading of a binary

tree traversed in Inorder, Write inordcr traversal

algorithm for nn: 10

Write an algorithm to convert a to rest Into a binary

tree. Using your procedure convert the following fores t into a binary tree. JO

H

,

Fig. I

5. (a) Write recursive functions : 5,5

• to create an excct copy of a given :ree

• to check whether the two binary trees are equivalent ,

or not.

, Courtesy : Bansal Institute of Science & Technology, Bhopal http://bist.dyndns.org

user
Rectangle
Page 14: ucu - RGPVONLINE.COM

, , J

(b) Create a binary search tree and a heap of the following data: 5.S

42, 23, 7~, 11, 65.58, 94, 36, 99, 85

6. (u) Explain aboul the following ~arching methods b} giving examples ; 8

• binary search

• iudexed sequential seurch

(b) Write quick sort algorithm. Using q~ick sort technique son the follo'NinJl array in ascendirg order; 12

25, ~7, 48. 37, 12.92.86, JJ, 50, 42

7. (a) What do you understand by hashing? Describe any four hashing functions with suitable example. 10

(b) What is minimum spanning tree ? Write Kruskaj's algorithm 10 find the mir.imum cost spanning tree of any graph. UsiPg this algorithm find the minimum spanning tree of the follO',vjng graph.

" 10

,

"

, , Fig. 2

8. (a) What are the properties of a a-tree ? Construct a a-tree of order 5 using the following data: 10 2, 7, 9, 12, 3D, 15, 18, 25, 13,4,6,8,11,32, J;" 31, 33, 34

(b) What is B +- Tree? Write the differences between a-trees and B -s-trecs 10

• MCA-203(N) 4, 100

Courtesy : Bansal Institute of Science & Technology, Bhopal http://bist.dyndns.org

user
Rectangle
Page 15: ucu - RGPVONLINE.COM

- .

lbtal No. of Question> : 8 J I Total No. of Printed Pagel : 3

MCA-203

M. C. A. (Second Sl'me~l er)

EXAMINATION, Dee., 2005

DATA STRUCTURES

(MCA-203)

T=, Thrrc: lJoufIi

Maximum Marks : l()()

Minimum Pass Marks .. 4()

Note : Atte mpt any five questions. All questions carry equal marks.

1. (a) A square matrix is said to he symmetric: if a (i-jl = a (j, i) for i and j. Such a symmetric square matrix may be stored i:I an array of half the size of the manix in terms of numbe r of ele ments :

(b)

(1) Derive the formula for index of one dimensional array in terms 0: indices of symmetric square

matrix for the above storage scheme. 8

(ii) Write un argo rm.m to print the sum of each

column of the above matrix stored 3., O~

dimensional array. 11

Define Recursion with the help of example. 4

2. (a) Define Slack. Uescnbe an algorithm 10convert an infi\

expression to P?5tfix expression. llJ P. T. a

Courtesy : Bansal Institute of Science & Technology, Bhopal http://bist.dyndns.org

user
Rectangle
Page 16: ucu - RGPVONLINE.COM

f z J MCA-20J

(b) Describe circular queue. Wri te algorithms 10 add and

delete an item from circular queue. l()

3. (3) Given a pointer P, to a node in a doubly linked list,

write algorithms to insert a node after the node

pointed to by P, ar.d to delete the node before the node pointed to by P, Handle the oondiliul1~ ",hen P pointing

to first or last node of the list. 10

~ b ) Suggest a suitable node structure to represent polynomi"15 miog linkcd list. e rf'"t" n linked lict mine

your structure for the following polynomial: 10

x7r ­ 100Jlz6 + 6.l)'Z + 20x + 40

~. (a) What is a heap? How can a heap be used to represent a priority queue ? Discuss bow to perform the operations of item insertion and removal in heaps used to represent priority queues 10

(b) What is tree tra versal? Write recursive algorithm for

various types of traversal. Eeplain with the help of an example. 10

5. (a)

(b )

Discuss the advantages and disadvantages of a threaded storage representation for binary tree. 6 Sha vl thaI Ihe maximum number of nodes in a binary

tree of height H is ZH + 1 - l. 7

(c) What is forest? Explain how rorest is convened to Iree. 7

6. (a) Write quick-sort algorithm for sorting. What is the

average case and worst case time complexity of quick­sort 7 Trace the quick-~on algorithm for the follooving

da ta: 12

1,2, 3,.6. 5, 4, 7, 8, 9, 12, 11, to

, ­

Courtesy : Bansal Institute of Science & Technology, Bhopal http://bist.dyndns.org

user
Rectangle
Page 17: ucu - RGPVONLINE.COM

"'" [ :J I

(b) Explain the working of Binary Search. Compare the performance of Binary search and Sequential search.

e 7. (a ) Define a Graph. Explain its differe nt rep resentation in

memory using suitable example. 10

(b) Write any minimum spanning tree algor ithm for graphs. Explain its working with suitable example. 10

8. Write short notes on any two of the following : 10 each

(a) B-Tree

(b) Il ~hing

(c) Dynamic Memory Management

MCA-IOJ 4,160

Courtesy : Bansal Institute of Science & Technology, Bhopal http://bist.dyndns.org

user
Rectangle
Page 18: ucu - RGPVONLINE.COM

Total No. of Oucsuons : 8 I I Total No. of Printed Pages : 3

MCA- 203

\ 1. C. A. (Second Semester) EXA.MINA1l0N, Dt'C. 2004

DATA STRU cruRES

(MCA - 203)

lime; Three Hours

MaximUM Marks ; J(){)

Minimum Puss Marks: 40

x ote : Auempt any five questions. All questions carry equal marks. Make suitable examples and references wherever necessary.

I. (a) How the conversion of INFIX expression to PQSfFlX expression takes place using a stack '! Write an algorithm to convert an INFIX expression into POSTFIX expression 10

(b) Convert the following I~ FlX expression into POSTFlX expression with the help of the algorithm :

A + (B* C - (D IEfF1*G).H 10

2. (a) Write algorithms to Insert and delete an element in a circular queue. 10

(b) Briefly describe the concept and use of doubly linked list. Write an algorithm to delete a node of doubly linked list. 10

P. T. O.

-

Courtesy : Bansal Institute of Science & Technology, Bhopal http://bist.dyndns.org

user
Rectangle
Page 19: ucu - RGPVONLINE.COM

.' ~

, , I MCA-203

3. (<I) How does a circular header linked list differs than a

hnenr linked list? Write a proc edure [0 insert a ne w node into a circu lar header linked list. l()

(b) wme a arm-recursive algorithm for in or der traversal

of a bina ry tree. 10

-I. (a) What is meant by binary search tree ? Write an algorithm to delete a node from a binary search tree .

Include all possibilities. 10

(b) Create a binary expression tree for the following expression ami write its pre-order and post order

t raversals : iO

-A++ +- -B +D ++ + - -C-E++

5. (a) Discuss the worst case time complexity of selection

sort algorithm. Write an algorithm for insertion sort method, then analyse its time complexity in WOfS! case with selection son method. 10

(b) Discuss the application of data structure graph. What

are the most commonly used graph representation methods ? How do we select a particular

represemancn ? Discuss. 10

,6. (a) Prove that Prim's algorit hm finds a minimum covr

spanningtree for every connected, undirected graph. 10

(b) Define AVL tree. Consider the following Jist of

elements :

3,5. 11,8,4, 1,12,7,2, 6

Describe and , construct an AVL tree for rrese

elements. 10

-Courtesy : Bansal Institute of Science & Technology, Bhopal http://bist.dyndns.org

user
Rectangle
Page 20: ucu - RGPVONLINE.COM

.....~~~

l" 7. (a) DIfferentiate BInOi ry search ITCC, AVL tree and m-wav

tree .... illJ the help of 5UII:lbh: examples. ltl

(b) Draw a Bctree of order-S for the following dam irems :

D I I K Z R POF A S W TC L N Y ~f iO

S wme s.hor. notes OD any Jour of the follO\\-ing :

ti) Ime rpc tanon Sl:llch

20

[ji Shortest path a.llfonthm

(in) He _p

(i \') Circular Lin ked hSI

(vj Linked SIJck

[vi] Time -complexity of algorithm

3,900

Courtesy : Bansal Institute of Science & Technology, Bhopal http://bist.dyndns.org

user
Rectangle
Page 21: ucu - RGPVONLINE.COM

'Ictal No. of Ouesuons : 8 J [ Total No. of Printed Pages : 3

MCA-203

M. C. A. (Second Semester) EXAMINATION, J une, 2004

DATA srn.UCI1JRES

(M CA- 20J)

Time: Three Hours

Maximum Marks : J{){)

Minimum Pass Marks : 40

Ncte : Attempt any fi~'1: questions. All questions carry equal marks. Make suitable examples and references wherever neces.'ary. ..

1. (a) Describe any three applications of slack. Differentiate array. stack and queu e with the help of suitable examples. Write an algorithm to evaluate a POStfIX expression. 10

(b) Evaluate the following postfix expression with the help of algorithm: 10

35 + 6 4 - · 4 1 ~2t +

2. (a) Describe data structure queue and its importance in Computer Science. Briefly describe different implcmcntaucns of queue. 10

(b) What do you understand by U nked queue ? Write preudo-codes for insertion and dele uons operations on a linked queue. ' 10

P. T. O.

Courtesy : Bansal Institute of Science & Technology, Bhopal http://bist.dyndns.org

user
Rectangle
Page 22: ucu - RGPVONLINE.COM

[ 2 J MCA-203

3. (a) Describe the adva ntages of linked list over array. How linked list is implemented using array ? Write the algorithms to getnode and reteasenode in context to the Storage area created using array. 10

(b) A doubly linked li st is created in ascending order of elements. How can the clements of doubly-linked list be displayed in descending order ? Write the algorithm for the method. 10

4. (a) Describe the following with the help of example : 10

(i) Parse tree and DOS tree

(ii) Strictly binary tree

(iii) Fully binary tree

(iv) Binary expression tree

(b) Draw a binary expression tree for the following expression : 10

A.B+C ~ D·E +F·GIH

5. (a) What is the advantage of binary search tree data structure ? How binary search tree is constructed ? Write an algorithm to insert a node into a binary search tree. 10

(b) Consider the following list of 10 test scores:

84, 76, 71, 90, 95, 86, 98, 93, 60, 87

Explain the method of sorting these test scores using quick sort. Write an algorithm for the method and analyse its worst and average case time complexities.

10

6. (a) Define a graph and a mult igraph. Describe and write Kntskal's minimum cost spanning tree algorithm. 10

Courtesy : Bansal Institute of Science & Technology, Bhopal http://bist.dyndns.org

user
Rectangle
Page 23: ucu - RGPVONLINE.COM

- - .

I a I (b) Describe dep th fir5t search or Bread th first search

method of traversing a graph. 10

7. (a) what is height balanced binary tree ? How is it

constructed ? Describe. 10

(b) Describe the method of constructing Bctree. Draw a B-tree of order-S for the following data items: 10

a gfb k d h rn j e s i r x c I n tup

8. Write short notes on any four of the following; 20

(i) H !Shing

(u) String processing appli cations

) 0 b '3 algori thm

(iv) Internal Sorting

(v) S+ tree

(vi) Th readed Binary tree

MCA-2OJ 6,650

Courtesy : Bansal Institute of Science & Technology, Bhopal http://bist.dyndns.org

user
Rectangle
Page 24: ucu - RGPVONLINE.COM

.' ,

Total No. of Oucstions : 8) ( Total No. of Printed Pages : 2

MCA-204

\ M. C. A. (Second Semester) EXMIINATION, June, 2004

COMPUTER ORIENTED NU MER iCAL ANALYSIS

(MCA-2M )

Time : Three Hours

Maximum Marks .. 100

Minimum Pass Marks : 40

Note: Attempt any five questions. Each question cames

equal marks.

1. (a) Show that the convergence of Ncwton-Raphson fonnula is quadratic.

(b) Find any real root of x3 = x +Y upto six digits using Ncwton-Raphscn formula.

2. (a) Describe iterative method of roots of equation with convergence condition.

(b) Find a root (near 1) of the following equation using ite rative me thod (upto six digits) :

x3+z? +lOx-ZO=O

3. (a) Explain Round-off, truncation and relative errors by

choosing suitable example.

(b) Given:

1 1 1 1 An = 1-'3+'S-7 + ········Zn 1

Compute A" correct to three digits. P. 1: O.

Courtesy : Bansal Institute of Science & Technology, Bhopal http://bist.dyndns.org

user
Rectangle
Page 25: ucu - RGPVONLINE.COM

8. Wri te short OOte$ on any two of the Icllcwing :

(a) Regula-falsi method of roots finding

(b) Gauss-Legendre integration formula

(c) Interpolation for unequal spacing

MCA-2~

Courtesy : Bansal Institute of Science & Technology, Bhopal http://bist.dyndns.org

user
Rectangle
Page 26: ucu - RGPVONLINE.COM

"0

Total No. of Ouesuons : 8 I [ T otal No. of Printed Pagr ~ : ..

MCA-203

I\t C. A. (Second Semester) EXAMINATION, n«, 21Kll

DATA STRUCTU RES

(MCA- 20J)

Time .. Three Haurx

Maximum .Harh .. !(I/)

Minimllm PUI.I Murkx : .10

Note: Attempt any jive questions. All questio:1S carry equal

marks.

I. (a) What is an upper triangular matrix? How is it stored

in memory? In an upper triangular matrix with n rows find the tctal number of non-zero terms and also obtain the accessing function.

(b) Transform the following c .'(llrc~~ion to pref ix and post

fIX form :

(A + B) - D + E/{F+A. D) + C

2. (a) LeI P be a pointer 10 a circularly linked lis!. Show how this list may be used as u queue ? Write algor ithms to add and delete elements from this que ue .

{b] Write a program that contains...vc functions INVERT and CO PY.1NVERT inverts a given singly linked list

....ith Pointer LIST COPY makes II copy of this list. P. T. o.

Courtesy : Bansal Institute of Science & Technology, Bhopal http://bist.dyndns.org

user
Rectangle
Page 27: ucu - RGPVONLINE.COM

• ­'" LlCIt--203

3. (a) What are the properties 01 a well-defined recLtM"e procedure ? Write a recursive algorithm for binary search.

(il) Define the following by giving examples :

(i) Complete binary tree

(ii) Full binary tree

(iii) Height balanced tree

( i\') Weight balanced tTCC

-t . (a) Explain ITCC traversal. Write iterative algorithm for prccrdcr lfOl\er,al of a binary tree.

(b) Fur tile following binary tree write in order, pre orde r and post order traversal.

D p

1\c

A J

Fig. 1

5. (a) What is a forest ? Wri te different step!' 10 convert the following forest into a binary «ee.

, o

Fig. 2

Courtesy : Bansal Institute of Science & Technology, Bhopal http://bist.dyndns.org

user
Rectangle
Page 28: ucu - RGPVONLINE.COM

I , I

(b) What are Threaded Binary Tree; 7 Write a program to

traverse a threaded binary in inorde r.

6. (II) Compnrtl ~"q\,le l11ia1, ind.....,d ~que" li al and

interpolation search.

(b) What is Ifa~h i ng : Write the signiflcance of h:hhi~

funrti..n and e xplain 311\1 t"'o of rbcru .

7. (a) Write an algorithm fer quick sort. Find il~ efficiency. Arrange the folln...; ing array in a>orenoJing order u~ir~

quick ""r. :

Z5. 57, 48, ;'7, 12, 92. -.n. 3.­

(II) Explain ~en sort with the help of an example.

8. (a) Write Dijkstra's shortest path algorithm. Using th:s algcmhrr find the saon est path bet.....een A and H . ,

• 2 c

Fig. 3

(b ) Define AVL trees. Discuss its Insertion operation. To maim..;" an AVL ttte whal l>(:~ry Slcpo should be­

followed 7

\10. - 203

A

F G

H

Courtesy : Bansal Institute of Science & Technology, Bhopal http://bist.dyndns.org

user
Rectangle
Page 29: ucu - RGPVONLINE.COM

Total No. of Q uestions : 8 J rTotal No. of Printed Pages : 2

MCA-203

M. C. A. (Second Semester) EXAl\1INATION, June, 2002

DATA STRUCI1JRE

(MCA-203)

Time .. 'Ihree H~

Maximum Marks: 100

Mininwm Pass Marks : 40

Note : Attempt any five questions. All questions carry equal

marks.

I. (.) Write algorithms for operation on a queue.

(b) How the conversion of an infu. expression to post-fix

takes place using a stack ?

2 (. ) How a linked queue can be implemented ?

(') Write an algorithm to insert a node in a Doubly linked

list.

3. (. ) How linked list can be implemented using arrays?

(b) Write an algorithm fer non-recursive implementation

of pre-order traversal of a Binary Thee.

4. (.) Discuss the various representations of a Binary Thee.

(') Compare sequential search with indexed sequential

search. • P. T. O.

Courtesy : Bansal Institute of Science & Technology, Bhopal http://bist.dyndns.org

user
Rectangle
Page 30: ucu - RGPVONLINE.COM

1'1 S. (a) What arc different Hashing schema 1

(b) What are different techniques for collision resolution 1

6. Explain along wilb algorithm (any two) :

<a) Quick sort

(b) Merge son

(c) Bubble son

(d) Heap scrt

7. <I) ~ the various graph traversal schemes.

(b) What is a B+ - tree ? Compare it with B-tree.

8. Write sbcn DOles on any rhrn of the fonawing :

(a) Shortest path Algorithm

(b) AVL Tree

(e) Th readed Binary Tree

(d) Heap

MCA-203 • '....

Courtesy : Bansal Institute of Science & Technology, Bhopal http://bist.dyndns.org

user
Rectangle