You are on page 1of 4

www.jntuworld.

com

Code No: X1221

R07
II B.Tech I Semester, Supplementary Examinations, Nov - 2011 ADVANCED DATA STRUCTURES AND ALGORITHMS (Information Technology)

SET - 1

Time: 3 hours Answer any FIVE Questions All Questions carry equal marks

Max Marks: 80

1.

a) Explain the need for OOP and also explain the principles of Object Oriented Programming. b) Explain in detail about dynamic memory allocation and deal location. (8M+8M) a) What is the deal with operator overloading? Write the benefits of operator overloading. b) Explain the need for Virtual Destructor. Can we have Virtual Constructors? (8M+8M) a) What is single inheritance? Write a program to illustrate the concept of single Inheritance. b) What is Performance analysis? Analyze the performance of algorithm for finding maximum number among given numbers. (8M+8M) a) What is dictionary? Write the abstract Class for the dictionary. b) What is hashing with Chains? Explain? Compare this with Linear Probing. a) Write a C++ function to insert an element into min heap. b) Discuss in detail about polyphase merge in detail.

2.

3.

4.

5.

6.

a) Explain how an AVL tree can be used to sort a sequence of n elements in O (n log n) time. b) State the conditions under which insertion of a Red-Black tree will result in a sequence of recolouring steps that terminate with the root changing color. (8M+8M) a) Discuss in detail about biconnected components? Explain the procedure of finding biconnected components clearly. b) Explain the procedure for representing disjoint sets. What are various operations to be performed on sets? Explain in detail. (8M+8M) a) Using dynamic programming find optimal solution for the following 0/1 knapsack problem Consider the knapsack instance n =3, (w1,w2,w3) = (2,3,4), (p1,p2,p3) = (1,2,5), and m = 6. b)What is the solution generated by job sequencing with deadlines algorithm when n=4,(P1,P2,Pn) = (100,10,15,27) and (d1, d2dn) = (2,1,2,1). (8M+8M)

7.

T N

W U

R O

D L

(8M+8M)

(8M+8M)

8.

1 of 1

www.jntuworld.com

www.jntuworld.com

Code No: X1221

R07
II B.Tech I Semester, Supplementary Examinations, Nov - 2011 ADVANCED DATA STRUCTURES AND ALGORITHMS (Information Technology)

SET - 2

Time: 3 hours Answer any FIVE Questions All Questions carry equal marks 1.

Max Marks: 80

a) Explain the differences between procedural languages and Object Oriented languages. b) Can you think of a situation where your program would crash without reaching the breakpoint which you set at the beginning of main()? (8M+8M) a) Discuss different types of polymorphism in detail. b) What are Virtual Functions? How to implement virtual functions in C++?

2.

3.

a) Explain list ADT implementation using templates class in detail. (8M+8M) b) What is space complexity? Explain different notations in calculating performance analysis. a) What is the structure to represent node in a skip list. Write the constructor for skip List. b) Explain the linear probing method in Hashing? Explain its performance analysis? (8M+8M) a) Discuss in detail about the model for external sorting . b) Write a C++ function to remove max element form max heap.

4.

5.

6.

a) Define a Binary Search Tree? Write the procedures to perform insertion, deletion in a binary search tree? b) Will the root of a Re-Black tree always be black after performing a deletion operation? Justify with an example. (8M+8M) a) Explain in detail about Weighing rule and collapsing rule in detail. b) Explain C++ code about efficient non recursive in-order tree traversal algorithm. (8M+8M) a) Trace the following graph and find the minimum cost spanning tree using Prims method

7.

T N

W U

R O

D L

(8M+8M)

(8M+8M)

8.

b) State principle of optimality. Explain its significance in dynamic programming. 1 of 1

(8M+8M)

www.jntuworld.com

www.jntuworld.com

Code No: X1221

R07
II B.Tech I Semester, Supplementary Examinations, Nov - 2011 ADVANCED DATA STRUCTURES AND ALGORITHMS (Information Technology)

SET - 3

Time: 3 hours Answer any FIVE Questions All Questions carry equal marks

Max Marks: 80

1.

a) Explain in detail about friend functions and inline functions. b) What is the difference between compiling and linking? Explain in detail.

(8M+8M)

2.

a) Explain about function overloading and operator overloading in detail. b) What is Hybrid inheritance? Write a program to illustrate the concept of Hybrid Inheritance. (8M+8M) a) Explain Queue ADT implementation using template class in detail. b) How can we handle a constructor that fails? Illustrate with a program.

3.

4.

a) What is a linked list/chain. Write the class header for the class chain. b) Write the program which gives the Constructor and copy constructor for chain. a) Discuss in detail about external sorting with an example. b) Define heap and discuss about operations like insertion and deletions in heap sort.

5.

6.

a) What is the terminating condition for Binary search and how do you reduce the problem into sub problems in Binary search. b) Explain the advantages of splay tree in representation of dictionaries. (8M+8M) a) Implement Quick sort using Divide and conquer technique. Analyze the average case time complexity of Quick sort? b) Describe in detail about union and find algorithm. (8M+8M) a) Let n=4 and (a1,a2,a3,a4)=(do,if ,read,while).Let P(1:4)=(3,3,1,1) and Q(0:4)=(2,3,1,1,1).The P's and Q's have been multiplied by 16 for convenience. Construct the table of values of W(i,j),R(i,j) and C(i,j) computed by the algorithm to compute the roots of optimal sub tree. Finally obtain optimal binary search tree. b) Prove that any weighted connected graph with distinct weights has exactly one spanning tree. (8M+8M)

7.

T N

W U

R O

D L

(8M+8M)

(8M+8M)

(8M+8M)

8.

1 of 1

www.jntuworld.com

www.jntuworld.com

Code No: X1221

R07
II B.Tech I Semester, Supplementary Examinations, Nov - 2011 ADVANCED DATA STRUCTURES AND ALGORITHMS (Information Technology)

SET - 4

Time: 3 hours Answer any FIVE Questions All Questions carry equal marks

Max Marks: 80

1.

a) Each class has some special member-functions, which calls can be inserted by the compiler into a code without explicit instruction of the programmer. Enumerate such functions, members and cases, when implicit calls can arise. b) Can a copy constructor accept an object of the same class as parameter, instead of reference of the object? (8M+8M) a) Why should we use iostream instead of the traditional cstdio? Give reasons. b) What is abstract class? Explain in detail with an example.

2.

3.

a) What is a Sparse Matrix? Explain about the linear list representation of a sparse matrix? b) Write a program to count the number of lines in the given file? (8M+8M) a) Write a program for the class interface implementation of Open Addressing hashing? b) Perform the insertion operation for Open Addressing hashing with Quadratic Probing for the following list: 10, 54, 89, 18, 49, 65, 36, 97, 23, 69 (8M+8M) a) Define priority queue and explain about realizing a priority queue using heaps. b) Describe in detail about multi-way merging and poly-phase merging.

4.

5.

6.

a)What is an AVL search tree? How do we define the height of it? Explain about the balance factor associated with a node of an AVL tree. b) Describe the B-trees? Explain the advantages of B-trees. (8M+8M) a) Explain in detail about Strassens matrix multiplication .Calculate the time complexity of this method with conventional method b) Discuss the significance of binary search algorithm with divide and conquer technique. (8M+8M) a) Discuss in detail about Job sequence with deadlines problem and explain it with an example. b) What is spanning tree and explain this with krushkals algorithm? (8M+8M)

7.

T N

W U

R O

D L

(8M+8M)

(8M+8M)

8.

1 of 1

www.jntuworld.com