6
Seminar Topics - Scholarships - Admission/Entrance Exam Notifications USA-UK-Australia-Germany-France-NewZealand Universities List Engineering-MBA-MCA-Medical-Pharmacy-B.Ed-Law Colleges Information www.andhracolleges.c om The Complete Information About Colleges in Andhra Pradesh www.andhracolleges.com Code No: R059211201 Set No. 1 II B.Tech I Semester Regular Exa minations, November 2006 ADVANCED DATA STRUCTURES & ALGORITHMS ( Common to Information Technology and Computer Science & Systems Engineering) Time: 3 hours Max Marks: 80 Answer any FIVE Questions All Questions carry equal marks 1. (a) What is the defaul t data hid ing type for a cla ss ? Wh y are dat a members hidden? How would you access them? (b) In a printf sta teme nt, wha t are the codes for integer? oat? stri ng? How can you choose how many numbers occur before and after the decimal point for a oat? How can you pad zeroes to the begi nni ng of an in tege r to make it a specic length? [8+8] 2. What do you mean by run time polymorphism and how to implement run time polymorphism using virtual functions in C++? [16] 3. (a) What are some wa ys try / catc h / thro w can impro ve software qual it y? (b) How can we handle a cons truc tor that fails ? (c) How can we handle a destructor that fails. [5+5+6] 4. (a) What are the applications of stack explain with an example . (b) Explai n the list representation of a tree by means of an example. (c) Mention some common computing times for algorithms in order of increasing diculty? [5+5+6] 5. Develop a class for hash table using linear probing and neverUsed concept to handle an erase oper ati on. Wri te comp lete C++ code for all the methods. Inc lude 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 congured hash table in which neverUsed is true for every empty bucket. [16] 6. What is an A VL Tr ee? Write the algori thm to search for an elemen t of an AVL Search Tree? What is its time complexity? [16] 7. (a) Explai n the Binary tree in order traversal in o(n) and 0(1) spa ce. (b) Explai n divide and conquer strategy by means of its control abstrac tion. (c) What is the dierence betwe en Greedy method and Divide and conquer. [6+6+4] 8. (a) Explai n the Job sequencing with de adli nes wit h an example usi ng the greedy approach. 1 of 2

Rr059211201 Advanced Data Structures Algorithms

Embed Size (px)

Citation preview

Page 1: Rr059211201 Advanced Data Structures Algorithms

8/9/2019 Rr059211201 Advanced Data Structures Algorithms

http://slidepdf.com/reader/full/rr059211201-advanced-data-structures-algorithms 1/5

Seminar Topics - Scholarships - Admission/Entrance Exam Notifications

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

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

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

www.andhracolleges.com

Code No: R059211201 Set No. 1

II B.Tech I Semester Regular Examinations, November 2006ADVANCED DATA STRUCTURES & ALGORITHMS

( Common to Information Technology and Computer Science & SystemsEngineering)

Time: 3 hours Max Marks: 80Answer any FIVE Questions

All Questions carry equal marks⋆ ⋆ ⋆ ⋆ ⋆

1. (a) What is the default data hiding type for a class? Why are data membershidden? How would you access them?

(b) In a printf statement, what are the codes for integer? float? string? How canyou choose how many numbers occur before and after the decimal point fora float? How can you pad zeroes to the beginning of an integer to make it aspecific length? [8+8]

2. What do you mean by run time polymorphism and how to implement run timepolymorphism using virtual functions in C++? [16]

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) What are the applications of stack explain with an example.

(b) Explain the list representation of a tree by means of an example.

(c) Mention some common computing times for algorithms in order of increasingdifficulty? [5+5+6]

5. Develop a class for hash table using linear probing and neverUsed concept to handlean erase operation. Write complete C++ code for all the methods. Include amethod 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 andleave a properly configured hash table in which neverUsed is true for every emptybucket. [16]

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

7. (a) Explain the Binary tree in order traversal in o(n) and 0(1) space.

(b) Explain divide and conquer strategy by means of its control abstraction.

(c) What is the difference between Greedy method and Divide and conquer.[6+6+4]

8. (a) Explain the Job sequencing with deadlines with an example using the greedyapproach.

1 of 2

Page 2: Rr059211201 Advanced Data Structures Algorithms

8/9/2019 Rr059211201 Advanced Data Structures Algorithms

http://slidepdf.com/reader/full/rr059211201-advanced-data-structures-algorithms 2/5

Seminar Topics - Scholarships - Admission/Entrance Exam Notifications

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

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

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

www.andhracolleges.com

Code No: R059211201 Set No. 1

(b) Describe the dynamic programming approach for the construction of OBSTfor a set of n keys, if all keys are equally likely to be searched for. [8+8]

⋆ ⋆ ⋆ ⋆ ⋆

2 of 2

Page 3: Rr059211201 Advanced Data Structures Algorithms

8/9/2019 Rr059211201 Advanced Data Structures Algorithms

http://slidepdf.com/reader/full/rr059211201-advanced-data-structures-algorithms 3/5

Seminar Topics - Scholarships - Admission/Entrance Exam Notifications

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

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

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

www.andhracolleges.com

Code No: R059211201 Set No. 2

II B.Tech I Semester Regular Examinations, November 2006ADVANCED DATA STRUCTURES & ALGORITHMS

( Common to Information Technology and Computer Science & SystemsEngineering)

Time: 3 hours Max Marks: 80Answer any FIVE Questions

All Questions carry equal marks⋆ ⋆ ⋆ ⋆ ⋆

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 template? Explain about function templates and class templates withsuitable examples. [16]

3. (a) Write a program to change the case of each word in a file to initial capitals.

(b) Write a program to concatenate the two given strings? [8+8]

4. What are the different mathematical notations used for algorithm analysis. 16]

5. Develop a class for hash table using linear probing and neverUsed concept to handlean erase operation. Write complete C++ code for all the methods. Include amethod to reorganize the table when (say) 60% of the empty buckets have neverused equal to false. The reorganization should move pairs around as necessary andleave a properly configured hash table in which neverUsed is true for every emptybucket. [16]

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

7. (a) Explain the Binary tree in order traversal in o(n) and 0(1) space.

(b) Explain divide and conquer strategy by means of its control abstraction.

(c) What is the difference between Greedy method and Divide and conquer.[6+6+4]

8. (a) What are the general characteristics of greedy algorithms and the problemssolved by these algorithms.

(b) What is 0/1 Knapsack problem? Explain how principle of optimality appliesto it. Also derive its dynamic recurrence relation. [8+8]

⋆ ⋆ ⋆ ⋆ ⋆

1 of 1

Page 4: Rr059211201 Advanced Data Structures Algorithms

8/9/2019 Rr059211201 Advanced Data Structures Algorithms

http://slidepdf.com/reader/full/rr059211201-advanced-data-structures-algorithms 4/5

Seminar Topics - Scholarships - Admission/Entrance Exam Notifications

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

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

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

www.andhracolleges.com

Code No: R059211201 Set No. 3

II B.Tech I Semester Regular Examinations, November 2006ADVANCED DATA STRUCTURES & ALGORITHMS

( Common to Information Technology and Computer Science & SystemsEngineering)

Time: 3 hours Max Marks: 80Answer any FIVE Questions

All Questions carry equal marks⋆ ⋆ ⋆ ⋆ ⋆

1. (a) What do you mean by Stack unwinding?

(b) What is the difference between const char ∗myPointer and char ∗const

(c) Define precondition and post-condition to a member function.(d) What are the conditions that have to be met for a condition to be an invariant

of the class? [4+4+4+4]

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

(b) Can we have “Virtual Constructors”? [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) What are the applications of stack explain with an example.(b) Explain the list representation of a tree by means of an example.

(c) Mention some common computing times for algorithms in order of increasingdifficulty? [5+5+6]

5. What is Hashing? Explain the different Hash table representations in detail? [16]

6. Define a class called binarySearchTree to represent a Binary search tree. Extendthis class by adding a public method outputInRange (Low,High) that outputs,in ascending order of key, all elements in a binary search tree whose key lies betweenLow and High. Use recursion and avoid entering sub trees that cannot possiblycontain any elements with keys in desired range. [16]

7. (a) Explain the Binary tree in order traversal in o(n) and 0(1) space.

(b) Explain divide and conquer strategy by means of its control abstraction.

(c) What is the difference between Greedy method and Divide and conquer.[6+6+4]

8. (a) Explain the Job sequencing with deadlines with an example using the greedyapproach.

(b) Describe the dynamic programming approach for the construction of OBST

for a set of n keys, if all keys are equally likely to be searched for. [8+8]

⋆ ⋆ ⋆ ⋆ ⋆

1 of 1

Page 5: Rr059211201 Advanced Data Structures Algorithms

8/9/2019 Rr059211201 Advanced Data Structures Algorithms

http://slidepdf.com/reader/full/rr059211201-advanced-data-structures-algorithms 5/5

Seminar Topics - Scholarships - Admission/Entrance Exam Notifications

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

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

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

www.andhracolleges.com

Code No: R059211201 Set No. 4

II B.Tech I Semester Regular Examinations, November 2006ADVANCED DATA STRUCTURES & ALGORITHMS

( Common to Information Technology and Computer Science & SystemsEngineering)

Time: 3 hours Max Marks: 80Answer any FIVE Questions

All Questions carry equal marks⋆ ⋆ ⋆ ⋆ ⋆

1. (a) What is the difference between global static functions and static functions,class members.

(b) What is common and what is the difference between implementations of thecopy constructors, initialization and overloaded assignment operators?

(c) What is the difference between modifiers register, const and volatile? [5+5+6]

2. (a) Write a program to illustrate the concept of virtual base class with exampleprogram.

(b) How to implement run time polymorphism using virtual functions. [8+8]

3. (a) Explain about console I/O and formatted I/O streams in C++.

(b) Write a program to count the no of lines in given text file. [8+8]

4. Write and explain UNION and find algorithms with weighting and collapsing rule.[16]

5. Develop a class for hash table using linear probing and neverUsed concept to handlean erase operation. Write complete C++ code for all the methods. Include amethod to reorganize the table when (say) 60% of the empty buckets have neverused equal to false. The reorganization should move pairs around as necessary andleave a properly configured hash table in which neverUsed is true for every emptybucket. [16]

6. Define a Binary Search Tree? Write the procedures to perform insertion, deletion

and searching in a binary search tree? [16]

7. (a) Explain the Binary tree in order traversal in o(n) and 0(1) space.

(b) Explain divide and conquer strategy by means of its control abstraction.

(c) What is the difference between Greedy method and Divide and conquer.[6+6+4]

8. (a) What are the general characteristics of greedy algorithms and the problemssolved by these algorithms.

(b) What is 0/1 Knapsack problem? Explain how principle of optimality applies

to it. Also derive its dynamic recurrence relation. [8+8]

⋆ ⋆ ⋆ ⋆ ⋆

1 of 1