Sunteți pe pagina 1din 4

www.andhracolleges.

com The Complete Information About Colleges in Andhra Pradesh

^dͲϭ
Code No: X0523
II B.Tech I Semester (R07) Regular Examinations, Nov- 2009

ADVANCED DATA STRUCTURES


(Com to CSE, ECC)
Time: 3 hours Max Marks: 80
Answer any FIVE Questions

www.andhracolleges.com
All Questions carry equal marks

1. a) How is object-oriented programming different from structured programming?


Consider a suitable example to support your answer. (8M)
b)What is an inline function? What are its advantages? Discuss two different ways to
make a function inline. Can you make all functions inline? Justify your answer. (8M)
2. a) What is polymorphism? How is run-time polymorphism supported in C++? Explain
with suitable example. (8M)
b) What is function overloading? How does compiler resolve the invocation of the
overloaded functions? (8M)
3. Describe the operations on a singly linked list. (16M)
i) Inserting a node into the list
ii) Deleting a node from the list

4. a) What is a hash function? Explain briefly. (8+8M)


b) Write briefly about dictionary ADT. Mention some applications

5. a) Write ADT for a max priority queue and briefly explain each of the operations.
(5M)

www.andhracolleges.com
b) Write the member function ( or function template) for the insertion in a priority queue
in C++ using heaps. What is the complexity for this operation? (11M)

6. a) State the four properties which define a non-empty binary search tree (BST). (6M)

b) If N elements are inserted into a BST, what is the worst case height of the Tree. Give
an example figure for such a tree when N is 5. (4M)
c) Give an example (figure with height 3) for a full BST. (6M)

7. a) Define red-black tree? Give the properties of red-black tree. (8+8M)


b) Write pseudo code for right rotate in red black tree.

8. Write an algorithm for Brute Force pattern matching and analyze it time complexity with
suitable example. (16M)

Seminar Topics - Scholarships - Admission/Entrance Exam Notifications


USA-UK-Australia-Germany-France-NewZealand Universities List

www.andhracolleges.com Engineering-MBA-MCA-Medical-Pharmacy-B.Ed-Law Colleges Information


www.andhracolleges.com The Complete Information About Colleges in Andhra Pradesh

^dͲϮ
Code No: X0523
II B.Tech I Semester (R07) Regular Examinations, Nov- 2009

ADVANCED DATA STRUCTURES


(Com to CSE,ECC)
Time: 3 hours Max Marks: 80
Answer any FIVE Questions

www.andhracolleges.com
All Questions carry equal marks

1. Explain the following with examples in the context of C++:


a) constructors and destructors (4+4M)
b) Garbage collection and Dynamic memory allocation (4+4M)

2. a) Explain the concept of virtual function. (8M)


b) What is Template? Discuss on member function templates. (8M)

3. Write a program for Stack using a C++ Template (16M)

4. a) List out dictionary ADT methods (6+10)


b) Define hash code map. Write the types of hash code map.

5. a) What is the difference between a heap and a binary tree? (2M)


b) Give an example figures (height 4) for max heap and min heap (8M)
c) Give a figure of a binary tree( height 4) which is not a heap and state why it is
not a heap (6M)

6. a) What is an Indexed Binary Search Tree(BST) ? (4M)

www.andhracolleges.com
b) Write the ADT specification for an Indexed BST. (6M)
c) Write the class definition for BST in C++. (6M)

7. Consider the length of the root-to-external-node path be the number of pointers on the
path. If P and Q are two two-root-to-external paths in a red-black tree, then prove that
length(P) ≤ 2length(Q). (16M)

8. Write an algorithm for Boyer Moore pattern matching and analyze it time complexity
with suitable example. (16M)

Seminar Topics - Scholarships - Admission/Entrance Exam Notifications


USA-UK-Australia-Germany-France-NewZealand Universities List

www.andhracolleges.com Engineering-MBA-MCA-Medical-Pharmacy-B.Ed-Law Colleges Information


www.andhracolleges.com The Complete Information About Colleges in Andhra Pradesh

^dͲϯ
Code No: X0523
II B.Tech I Semester (R07) Regular Examinations, Nov- 2009

ADVANCED DATA STRUCTURES


(Com to CSE,ECC)

www.andhracolleges.com
Time: 3 hours Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks

1. a) What is an access specifier? Briefly discuss the access specifiers in C++. (8M)
b) Discuss the different storage classes in C++. (8M)

2. With suitable example, explain the following:


(a) Multiple Inheritance (8M)
(b) I /O manipulators (8M)

3. Describe Queue using a C++ Template (16M)

4. a) Illustrate Linear probing with an example (8+8M)


b) Explain Searching operation with Linear Probing
5. a) Compare the worst case complexity for insertion operation in binary search tree and a
heap. (4M)
b) Assuming integral priority numbers write a C++ program to implement priority queue
using heap (12M)

www.andhracolleges.com
6. a) Give an example ( figure with height 3 ) for a complete binary search tree
(BST) which is not full (4M)
b) Write a C++ function template for inserting an element into a BST.
What is the complexity (on the average and worst case)? (10+2M)

7. Consider h be the height of red black-tree (excluding external nodes), n be the number of
internal nodes in the tree and r be the rank of root
Prove that (5+5+6M)
(a) h ≤ 2r
(b) n ≥ 2r-1
(c) h ≤ 2log2(n+1)

8. Write an algorithm for KMP pattern matching and analyze it time complexity with
suitable example. (16M)

Seminar Topics - Scholarships - Admission/Entrance Exam Notifications


USA-UK-Australia-Germany-France-NewZealand Universities List

www.andhracolleges.com Engineering-MBA-MCA-Medical-Pharmacy-B.Ed-Law Colleges Information


www.andhracolleges.com The Complete Information About Colleges in Andhra Pradesh

^dͲϰ
Code No: X0523
II B.Tech I Semester (R07) Regular Examinations, Nov- 2009

ADVANCED DATA STRUCTURES


(Com to CSE,ECC)
Time: 3 hours Max Marks: 80
Answer any FIVE Questions

www.andhracolleges.com
All Questions carry equal marks

1. a) Write a C++ program to accept a 5 digit number and report whether it is divisible by
3, 5, 7, 9 or not. (8M)
b) Describe the Friend function (8M)

2. a) What is containership? How does it differ from inheritance? (8M)


b) How is cout able to display various types of data without any special instructions? 8M)

3. a)Give the Abstract class specification of a linear list (10M)


b) Let L=(a,b,c,d) be Linear list. What is the result of the following operations.?
i) empty(), ii)size(), iii)get(2), iv) indexOf(a), v) erase(2), vi) Insert(2,f) (6M)

4. a) Illustrate double hashing with an example (8+8M)


b) Analyze the performance of hashing, Mention some application.

5. a)With an example briefly explain multiway merging. (8M)


b) Draw max heap figure with the same nodes as above. If the root is now deleted explain
the steps required to retain the priority queue structure (8M)

www.andhracolleges.com
6. a) If there are 63 nodes in binary search tree (BST) what is the maximum possible height
and what is the minimum possible height? Explain the relation between height and
complexity for the operations. (6M)

b) Write the function template in C++ for searching an element in a BST. (10M)

7. a) Write pseudo code for right rotate in red black tree


b)Write a insertion algorithm for red black tree. Also analyze its complexity. (8+8M)

8. What is trie ? Explain the properties of standard tries. (16M)

Seminar Topics - Scholarships - Admission/Entrance Exam Notifications


USA-UK-Australia-Germany-France-NewZealand Universities List

www.andhracolleges.com Engineering-MBA-MCA-Medical-Pharmacy-B.Ed-Law Colleges Information

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