Download 2013S

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Lattice model (finance) wikipedia , lookup

Rainbow table wikipedia , lookup

Quadtree wikipedia , lookup

Interval tree wikipedia , lookup

Red–black tree wikipedia , lookup

B-tree wikipedia , lookup

Binary tree wikipedia , lookup

Binary search tree wikipedia , lookup

Transcript
Code No: X0523
R07
SET - 1
II B. Tech I Semester Supplementary Examinations Dec - 2013
ADVANCED DATA STRUCTURES
(Com. to CSE, ECC)
Time: 3 hours
Max. Marks: 80
Answer any FIVE Questions
All Questions carry Equal Marks
1.
a) Explain the difference between class and object in terms of Access Modifier.?
b) Explain under what circumstances the following statement would be used:
i) Throw;
ii) void fun1 (float x) throw ()
iii) Catch (…)
(7M+9M)
2.
a) Show by a suitable example, how constructors are called in a multilevel inheritance.
b) Why do we require pure virtual function? Explain giving a suitable example.
(8M+8M)
3.
a) Define Space Complexity and time complexity. Give reasons for measuring the space and
time complexity. Discuss trade-off between time and space complexity
b) Write a C++ code to perform operations in stack ADT using templates
(8M+8M)
4.
The following values are to be stored in a hash table 251, 412, 936, 151, 162, 462, 127
Describe how the values are hashed by using division method of hashing with a table size of 6.
Use separate chaining as the method of collision resolution.
(16M)
5.
a) What is a heap? Briefly describe the properties of heap.
b) With an example, briefly describe multiway merge.
(8M+8M)
6.
What do you mean by AVL tree? Construct an AVL tree by inserting the following Elements in
the order of their occurrence H, I, J, B, A, E, C, F, D, G, K, L,
(16M)
7.
a) What is splay tree? Briefly describe the properties of B-tree
b) List the properties of Red Black Trees
8.
Describe Boyer -Moore algorithm with the help of an example.
1of 1
|''|'||||''|''||'|'|
(8M+8M)
(16M)
Code No: X0523
R07
SET - 2
II B. Tech I Semester Supplementary Examinations Dec - 2013
ADVANCED DATA STRUCTURES
(COM. to CSE, ECC)
Time: 3 hours
Max. Marks: 80
Answer any FIVE Questions
All Questions carry Equal Marks
1. a) Define inline function with an example. Compare inline function with macros.
b) Describe Exception handling mechanism in C++ for a class with an example
2.
3.
4.
5.
(8M+8M)
a) Write a C++ code to overload the unary operator ‘-‘.
b) Explain the concept of function overloading with suitable example codes.
(8M+8M)
a) Briefly describe the components of space complexity.
b) With an example program briefly describe stack ADT.
(8M+8M)
a) What is skip list? Briefly describe ideal case skip list representation
b) Write short notes on linear and quadratic probing
(8M+8M)
a) What is external sorting? With an example, briefly describe polyphase merge.
b) Briefly describe multiway merge.
(8M+8M)
6.
a) Write an algorithm to find the successor of an element(x) in a binary search tree.
b) Write an algorithm to delete a node Z of a binary search tree if it has 2 children
(8M+8M)
7.
a) Compare and contrast Red-Black and splay trees.
b) Briefly describe B-trees of order in.
(8M+8M)
8. Explain the activities performed by pattern matching algorithm. Show brute force method is
used to perform string pattern matching.
(16M)
1 of 1
|''|'||||''|''||'|'|
R07
Code No: X0523
SET - 3
II B. Tech I Semester Supplementary Examinations Dec - 2013
ADVANCED DATA STRUCTURES
(COM. to CSE, ECC)
Time: 3 hours
Max. Marks: 80
Answer any FIVE Questions
All Questions carry Equal Marks
1.
a) Define a class to represent a bank account. In the class, include the following members: Data
members: name of the depositor, account number, type of account, and balance amount in
the account. Member functions: to assign initial values, to deposit an amount, to withdrawal
an amount after checking the balance, and to display the name and balance. Write main()
code to test your class?
b) Explain this pointer with example. What are the applications of this pointer?
(7M+9M)
2. a) Write a program to overload binary operator
* using friend function, to perform
multiplication of integer with a vector.
b) Define inheritance. What are the different types of inheritance? Explain each type with
suitable example(s).
(10M+6M)
3.
a) Define complexity. Explain Big(O) notation with an example.
b) Suppose LIST is a header (circular) list in memory. Write an algorithm which deletes the
last node from LIST.
(8M+8M)
4.
a) Define hashing? Explain any five popular hash functions.
b) Write short notes on skip lists?
(8M+8M)
5.
a) Explain external sorting. Why do we require it? How it is different from internal sorting?
b) With an example show how priority queues are constructed using heaps?
(8M+8M)
6.
a) How many distinct binary search trees can be created out of 4 distinct keys?
b) Suppose the following list of numbers is inserted in order into an empty binary search tree:
45, 32, 90, 34, 68, 72, 15, 24, 30, 66, 11, 50, 10. Construct the binary search tree. (8M+8M)
7.
a) Briefly describe Red-black trees.
b) Compare search trees.
8.
(8M+8M)
With an example, explain Knuth Morris Pratt algorithm?
1 of 1
|''|'||||''|''||'|'|
(16M)
Code No: X0523
R07
SET - 4
II B. Tech I Semester Supplementary Examinations Dec - 2013
ADVANCED DATA STRUCTURES
(COM. to CSE, ECC)
Time: 3 hours
Max. Marks: 80
Answer any FIVE Questions
All Questions carry Equal Marks
1.
a) Write a code snippet to show the use of new operator for Dynamic Memory allocation.
b) Distinguish between the following terms giving suitable example:
i) Object and classes.
ii) Data abstraction
iii) Exception handling
(4M+12M)
2.
a) Compare Multiple Inheritance with Multilevel Inheritance giving suitable example
b) Explain how run-time polymorphism is achieved in C++ giving a suitable code. (8M+8M)
3.
a) With an example, briefly describe list ADT.
b) Using templates write a C++ code to perform operations in Queue ADT?
4.
Define Hashing. Explain Hash Tables, Hash function and linear probing?
5.
a) With an example, briefly describe priority Queue using heaps
b) Briefly discuss the models for external sorting
(8M+8M)
(16M)
(10M+6M)
6.
a) What is the difference between the binary-search tree property and the heap property? Can
the heap property be used to print out the keys of an n-node tree in sorted order in O(n)
time?
b) With an example, briefly describe AVL tree and insertion of element in AVL trees
(6M+10M)
7.
Write an algorithm to search a key in a B-tree? What is the worst case of searching in a B-tree?
List the possible situations that can occur while inserting a key in a B-tree?
(16M)
8.
Give the steps for the construction of tiers structure. Explain standard tries and compressed
tries with examples
(16M)
1 of 1
|''|'||||''|''||'|'|