|l|]1ilr ilililil ililt ililt ilil1 ilil ||ll
Reg.No. : Name:
Ml777L
Fourth Semester B.Tech.Engg.DegreeRegular/Supplement ary [Part Time Examination,July 2010 2K6 CS/IT 402zDATA STRUCTURESAND ALGORITHMS Time: 3 Hours
I. a) Write short note on Big-oh notation. b) Explain recursionwith example.
c) Write a note on doubly linked list. d) What are the advantages and disadvantages of linked lists over arrays? e) Write a short note on threadedbinary tree.
Max. Marks: 100
0 Write a note on priority queues. s) Write a note on the efficiency of sequentialsearchprocedure.
h) Write a note on binary searchtree.
(8x5=40) 8 7
r. 1) a) How strings are handledin Java ? Explain with example.
b) What do you meanby scalardata types ? Explain eachof them. OR
2) a) What are the differencesbetweenset and multiset ? Compareit with list.
Explain with exampletwo ways of defining sets. b) Explain structure datatype with example. 8 7 7
m. 1) a) Define stack.Explain the basicoperations and applications of stack.
b) With help of an algorithm explain how a node can be insertedand deleted from a list. OR
2) a) Implementordinaryqueueusing may.Check for overflow and underflow conditions. 8 b) Write an algorithm to convert an infix string into a postfix string.
7
P.T.O.
M L7771
|flfil]t ||t ililt ffiil |||il il|| ilil iltl
15
IV. 1) What do you meanby treetraversing? Mentionthe differenttreetraversal
methodsand explain eachof them. OR 2) a) What is a graph ? With suitableexampleexplainthe methodsusedto represent a graph. b) What is a heap ? Outline an algorithmto constru ct a heap.
9 6 10
5
v . 1 ) a) What is hashing? Explain the methodsfor resolvinghashcollision.
b) Write an algorithm for binary search. OR
2) a) Developa mergesort algorithmto sort a setof numbers.Discussaboutits time complexity. 10 b) Explain selectionsort algorithm. 5