Sunteți pe pagina 1din 2

rliltil

if l

ilililtflilililil|

llfll Iilil

Reg. No.

19287

Name : ................

IV semester B.Tech. (Reg./sup./Imp.

- incruding part Time)

Degree Examinetion, June


(2007 Admn.)

2A]l

2K6 CS/TT 402: DATA STRUCTURES


AND ALGORITHMS
Time: 3 Hours
Max. Marks: 100

I. a) Define space and time complexity


of a program.
b) Explain strucrure data type with example.
c) what are rhe advantage.s of circular linked
rist over a linear list
d) Distinguish berween ordinary
eueue and circurareueue.
e) Write a short note on heap management.
0 Write a note on priority queue.

g) Discuss diff'erent hashing functions.


h) Sort 10' 15' 6' -5' 8, 12 in ascendilg order

using the Bubble Sort

fI. I ) a) Find the Big oh norarion for the folicwine

i)

algoritlm. (gx5=40)

8n + 4n.] + 8n4

ii) n2+nlogn
u, Vn +3logn
b) what do vou mean by scalar data types ? Explain

any Zdatatypes in

detail.

7
g

OR

2) Give the general plan for analysing the


recursive algorithms. Mathematically
analyse
the fac:torial problem, clearly inclicate
the steps
Yvr^^rrrvrrr on
----* comment
I - and
vrr rLJ
its
complexity.

15

IrI' 1) a) write algorithms for performing the folrowing


:
To
find
the sum rf alr the elements in a singry
D
rinked list.
ii) To append a new erement to the end of the rinked
y'{ what is a srack ? Exprain the basic
operations.

list.

10
J

OR
P.T.O.

www.itgeeks.in

M 19287
g

-E

l||lilil

2) a) Explain with diagrams" how nodes can be added and deleted from

ilr

ililt

ilil tfit |ilil ilt lill

the middle

of the linked list.

b) Write an algorithm to convert an infix string into a postfix


algorithm on the following string

string. Trace your

a+bxc+d.
rv. r) a) Write Kruskal's

algorithm. What are its applications ? How is it rdifferent from

Prim's algorithm

b) With suitable

example, explain BreadthFirstSearch aigorithm.

OR
2)

a) Explain anv 3 methods of representation of graph.


b) Write the results after traversing the tree in in-order, preorder and post order.

9
6

V. 1) a) What is a heap ?Write an algorithrn to sort an aftay of integers using the heap
sort method. Given 30, 6l, 52, 42, 15, 90, 88, 37 are the elements on the
array. Show the different stages of sorting.
t5
OR

2) a) What is hashing ? Explain the methods for resolving hash collision.


b) What are the different methods of searching ? Discuss their merits and
demerits.

www.itgeeks.in

10

S-ar putea să vă placă și