100% found this document useful (1 vote)
133 views3 pages

CS1151 Data Structures Nov Dec 2007 1

'Top-down design'? is 'c' langUage a top-down design?'merge sort is better than insertion sort. Why? 'what is the minimum number of nodesin an AVL tree of height 5? 'name any two algorithms used to find MST. Why? 'why?' 'how would you implement a stack of queues? write routines for inserting and deleting eiements from a queue. Check for the conditions Q-empt

Uploaded by

Sukan Aarush
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
133 views3 pages

CS1151 Data Structures Nov Dec 2007 1

'Top-down design'? is 'c' langUage a top-down design?'merge sort is better than insertion sort. Why? 'what is the minimum number of nodesin an AVL tree of height 5? 'name any two algorithms used to find MST. Why? 'why?' 'how would you implement a stack of queues? write routines for inserting and deleting eiements from a queue. Check for the conditions Q-empt

Uploaded by

Sukan Aarush
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Reg. No.

6 o

L.'

,\

J-

.v tt

H-3234
2007. NOVEMBER/DECEMBER DEGREEEXAMINATION, B.E.lB.Tech.
Third Semester Electronics and Communication Engineering

CS 1151 DATA STRUCTURES


(Also common to Computer Science and Engineering and Information Technology branches of Annual Pattern Candidates admitted in 2006)

(Regulation 2004) Time : Three hours

1.,

When will you say an algorithm efficient? Give the notations for time complexlty. What is answer. 'top-down design'? Is 'C' langUage a top-down design? Justify your

2,

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

Why is linked list used for polynomial arithmetic? Write the role of stack in function call. What is the minimum number of nodesin an AVL tree of height 5? What is the use of sentinel value in binary heap? Which is the best way of choosingthe pivot element in quick sort? Merge sort is better than insertion sort. Why? Define a graph. How it differs from tree?

10. What is minimum spanningtree? Name any two algorithms used to find MST.

ww

w.

aa na

PARTA-(10 x2=20 marks)

va

Answer ALL questions.

N.

co m

Maximum: 100 marks

PARTB-(5x16=80marks) 11. (d (i) Given two lists L1 and L2, wriLe the routines to compuheL1' aL2 using basic operations. (Hint : for efficient performance, sort (10) the tists). Write the routines for inserting and deleting eiements from a (6) queue. Check for the conditions Q-empty and Q-Full. Or (b) (i) (ii) 12. (a) (i) How would you implement a stack of queues?write routines for (8) creation and inserting of elements into it. (8) data into the list. write routines to insert heterogeneous Write the routines to insert and remove a node from Binary Search (10) Tlee.

(ii)

N.

Or (b) (i)

co m

(ii)

A full node is a node with two children. Prove that the number of full nodes plus one is equal to the number of leavesin a binary tree. (6)

13.

(a)

Explain, with suitable examples the basic heap operations and write (16) algorithms for the same.

L4. (r) (i) (ii)

ww

(b)

How will you resolve the collisions, while inserting elements into the hash table using separate chaining and linear probing? Write the routines for inserting, searching and removing elements from the hash (16) table using the above mentioned techniques. Write the routine for sorting z elements in increasing order using (r2) heap sort. order using heap sort. Sort 3, !, 4, I, 5,9,2,6 in decreasing Or (4)

w.

aa na

(ii)

\Vrite the proceduresto implement single and double rotations (10) rvhile inserting nodesin an A\4, tree.

va
Or

S h o r vt h e r e s u l t o f i n s e r t i n g2 , 7 , 4 , 5 , 9 , 3 , 6 , A\L tree.

7 into an empty (6)

(b)

(i) (ii)

Explain with example,about the insertion sort.

(6)

What is external sorting? Discuss the algorithms with proper (10) examples.

'd-3234

lb.

(a)

(i) (ii)

Discuss and write the program to perform topologicalsorting.

(6)

What is single source shortest path problem? Discuss Dijikstra's (10) single source shortest path algorithm with an example. Or

0d

(i)

Write an algorithm to find the minimum cost spanning tree of an (8) undirected, weighted Sraph. Find MST for the following graph. (8)

(ii)

ww

w.

aa na

va

N.
R 3234

co m

You might also like