0% found this document useful (0 votes)
52 views4 pages

Ads 2007

The document appears to be a set of practice exam questions for an Advanced Data Structures course covering topics like classes, inheritance, file handling, stacks, queues, trees, hashing, and searching algorithms. There are 8 questions given with sub-questions that focus on concepts, properties, implementations and applications of different data structures. The questions would require students to write code snippets or explain concepts in data structures at varying detail and complexity.

Uploaded by

andhracolleges
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
0% found this document useful (0 votes)
52 views4 pages

Ads 2007

The document appears to be a set of practice exam questions for an Advanced Data Structures course covering topics like classes, inheritance, file handling, stacks, queues, trees, hashing, and searching algorithms. There are 8 questions given with sub-questions that focus on concepts, properties, implementations and applications of different data structures. The questions would require students to write code snippets or explain concepts in data structures at varying detail and complexity.

Uploaded by

andhracolleges
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/ 4

www.andhracolleges.

com The Complete Information About Colleges in Andhra Pradesh

Code No: R059210503 Set No. 1


II B.Tech I Semester Supplementary Examinations, February 2007
ADVANCED DATA STRUCTURE
( Common to Computer Science & Engineering and Electronics &
Computer Engineering)
Time: 3 hours Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks

www.andhracolleges.com
⋆⋆⋆⋆⋆

1. (a) What is the default data hiding type for a class? Why are data members
hidden? How would you access them?
(b) In a printf statement, what are the codes for integer? float? string? How can
you choose how many numbers occur before and after the decimal point for
a float? How can you pad zeroes to the beginning of an integer to make it a
specific length? [8+8]
2. (a) What is multiple inheritance? Write a program to illustrate the concept of
Multiple Inheritance.
(b) What is Hybrid inheritance? Write a program to illustrate the concept of
Hybrid Inheritance. [8+8]
3. (a) Write a program to merge the contents of two given files ?
(b) Write a program to count the no of lines in the given file ? [8+8]
4. (a) What is a Deque. Define the ADT for a Deque.
(b) Define an abstract c++ class deque that includes methods for each function

www.andhracolleges.com
of the ADT deque. [8+8]
5. Develop a class for hash table using linear probing and neverUsed concept to handle
an erase operation. Write complete C++ code for all the methods. Include a
method to reorganize the table when (say) 60% of the empty buckets have never
used equal to false. The reorganization should move pairs around as necessary and
leave a properly configured hash table in which neverUsed is true for every empty
bucket. [16]
6. Define a Binary Search Tree? Write the procedures to perform insertion, deletion
and searching in a binary search tree? [16]
7. (a) Describe the B-trees? Explain the advantages of B-trees.
(b) Prove that let T be a red black tree with n interval nodes then no node has
depth greater than 2 log(n+1). [8+8]
8. (a) Explain about the inverted files.
(b) What is trie? Explain different types of tries. [4+12]

⋆⋆⋆⋆⋆
Seminar Topics - Scholarships - Admission/Entrance Exam Notifications
1 ofUSA-UK-Australia-Germany-France-NewZealand
1 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

Code No: R059210503 Set No. 2


II B.Tech I Semester Supplementary Examinations, February 2007
ADVANCED DATA STRUCTURE
( Common to Computer Science & Engineering and Electronics &
Computer Engineering)
Time: 3 hours Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks

www.andhracolleges.com
⋆⋆⋆⋆⋆

1. (a) What are the two steps that happen with delete p?
(b) What are the advantages of new operator than malloc in C?
(c) Explain about the C++ classes in detail and design a class for playing cards?
[5+5+6]

2. What is polymorphism? Explain about different types of polymorphism in C++


with suitable examples. [16]

3. (a) How can we provide printing for an entire hierarchy of classes?


(b) How can we open a stream in binary mode?
(c) How can we “reopen” std::cin and std::cout in binary mode? [5+5+6]

4. Write a C ++ program using stack ADT that reads an infix expression, converts
the expression to postfix form and evaluates the postfix expression. [16]

5. Define the abstract class for dictionary? Write the methods f ind, insert, erase used
in dictionary? Explain the time complexities to perform above three operations?

www.andhracolleges.com
[16]

6. (a) What is an AVL search tree? How do we define the height of it? Explain
about the balancef actor associated with a node of an AVL tree.
(b) Explain how an AVL tree can be used to sort a sequence of n elements in O
(n log n) time. [8+8]

7. (a) Describe the B-trees? Explain the advantages of B-trees.


(b) Prove that let T be a red black tree with n interval nodes then no node has
depth greater than 2 log(n+1). [8+8]

8. (a) Write an algorithm for the kmp flow chart construction? Compute the per-
formance of an algorithm.
(b) What are the properties of standard trie. [10+6]

⋆⋆⋆⋆⋆

Seminar Topics - Scholarships - Admission/Entrance Exam Notifications


1 ofUSA-UK-Australia-Germany-France-NewZealand
1 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

Code No: R059210503 Set No. 3


II B.Tech I Semester Supplementary Examinations, February 2007
ADVANCED DATA STRUCTURE
( Common to Computer Science & Engineering and Electronics &
Computer Engineering)
Time: 3 hours Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks

www.andhracolleges.com
⋆⋆⋆⋆⋆

1. (a) What do you mean by Encapsulation and explain in detail.


(b) Explain about friend and inline functions? [8+8]

2. (a) What is polymorphism? What constructions in C++ allow to say that this
language supports polymorphism? What polymorphism is used for?
(b) What is the difference and what is common in specificity of constructors and
destructors overloading? [8+8]

3. (a) What are some ways try / catch / throw can improve software quality?
(b) How can we handle a constructor that fails?
(c) How can we handle a destructor that fails. [5+5+6]

4. (a) Write the program which gives the Destructor for list/chain.
(b) Write a method to return the index of the first occurrence of an element in a
list/chain. [8+8]

www.andhracolleges.com
5. (a) What is a dictionary? Define the abstract data type for it? Write the abstract
class for the dictionary?
(b) Give the applications of dictionary or dictionary with duplicates in which
sequential access is desired. [8+8]

6. What is an AVL Tree? Write the algorithm to search for an element of an AVL
Search Tree? What is its time complexity? [16]

7. (a) Prove that net T be a B-tree of order m and height h. Let d = [m/2] and let
n be the number of elements in T.
i. 2dh−1 − 1 ≤ n ≤ mn − 1
n+1

ii. logm (n + 1) ≤ h ≤ logd 2
+1
(b) Explain the advantages of splay tree in representation of dictionaries. [10+6]

8. (a) Explain the construction of the kmp flow chart with an example.
(b) Explain the search engines. [10+6]

⋆⋆⋆⋆⋆

Seminar Topics - Scholarships - Admission/Entrance Exam Notifications


1 ofUSA-UK-Australia-Germany-France-NewZealand
1 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

Code No: R059210503 Set No. 4


II B.Tech I Semester Supplementary Examinations, February 2007
ADVANCED DATA STRUCTURE
( Common to Computer Science & Engineering and Electronics &
Computer Engineering)
Time: 3 hours Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks

www.andhracolleges.com
⋆⋆⋆⋆⋆

1. (a) What do you mean by Data abstraction?


(b) Difference between “C structure” and “C++ structure”.
(c) Diffrence between a “assignment operator” and a “copy constructor”.
(d) What is the difference between ?overloading? and “overridding”? [4+4+4+4]

2. (a) Explain the need for “Virtual Destructor”.


(b) Can we have “Virtual Constructors”? [8+8]

3. (a) Why should we use iostream instead of the traditional cstdio?


(b) Why does a program go into an infinite loop when someone enters an invalid
input character?
(c) How can we get std::cin to skip invalid input characters? [5+6+5]

4. (a) What is a Sparse Matrix? Explain about the linear list representation of a
sparse matrix?

www.andhracolleges.com
(b) Write a C++ program to implement addition of two sparse matrices? [8+8]

5. (a) Explain about the skip list representation of dictionary with an example?
(b) What are the data members of skipList class? Write the constructor for
skipList. [8+8]

6. (a) Write a method to delete the pair with the largest key from a Binary Search
Tree.
(b) Write a method to find the height of a Binary Search Tree? [8+8]

7. (a) Describe the B-trees? Explain the advantages of B-trees.


(b) Prove that let T be a red black tree with n interval nodes then no node has
depth greater than 2 log(n+1). [8+8]

8. (a) Explain the construction of the kmp flow chart with an example.
(b) Explain the search engines. [10+6]

⋆⋆⋆⋆⋆

Seminar Topics - Scholarships - Admission/Entrance Exam Notifications


1 ofUSA-UK-Australia-Germany-France-NewZealand
1 Universities List

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

You might also like