Вы находитесь на странице: 1из 4

Regulation- 2012

Reg. No:
(R)

SRI RAMAKRISHNA ENGINEERING COLLEGE, COIMBATORE


(Autonomous Institution, Approved by AICTE and Permanently affiliated to Anna University, Chennai)

AUTONOMOUS EXAMINATIONS - NOV 2014


THIRD SEMESTER - B.E - COMPUTER SCIENCE AND ENGINEERING
12CS2302 – DATA STRUCTURES AND ALGORITHMS
Answer ALL questions
Duration: 3 Hours Maximum: 100 Marks
PART - A (10 x 1 = 10 Marks)

1. Which of the following is implemented using for singly linked list?


a) merge sort b) insertion sort c) heap sort d) None of the above

2. A _______ graph is a connected graph that is not broken into disconnected pieces by
deleting any single vertex and incident edges.
a) undirected b) directed c) acyclic d) bi-connected

3. Which the following cannot be used an Top Of Stack while initializing an empty
stock.
a) 0 b) 1 c) 0 and -1 d) -1

4. If a node having two children is deleted from a binary search tree, it is replaced by
its____.
a) Preorder predecessor b) Inorder predecessor
c) Inorder successor d) None of the above

5. A sort which relatively passes through a list to exchange the first element with any
element less than it and then repeats with a new first element is called________.
a) heap sort b) quick sort c) insertion sort d) selection sort

-1-
6. B trees are generally ___________.
a) No specific structure b) very deep and very wide
c) very wide and shallow d) very deep and narrow

7. An AVL tree is a binary search tree, except that for every node in the tree, the height
of left and right sub trees can differ by atmost _____.
a) 0 b) -1 c) 2 d) 1

8. The goal of hashing is to produce a search that takes ___________ time.


a) O(n2) b) O(1) c) O(log n) d) O(n log n)

9. The major drawback of linear probe method is _______.


a) clustering b) chaining c) open addressing d) rehashing

10. In the circular linked list implementation of list ADT, the last cell’s Next pointer
points to _________.
a) first cell b) last cell c) NULL d) same cell

PART - B (5 x 2 = 10 Marks)
11. Mention the advantages of Linked List over arrays.
12. Distinguish full and complete binary tree.
13. When is rotation applied in AVL trees?
14. Insertion sort is best suitable if the list is already sorted-Justify.
15. Define hash function.

PART - C (5 x 16 = 80 Marks)

16. a) i) Define Queue. How is circular queue implemented? Give example. (8)
ii) Explain various linked list operations. (8)
(OR)
b) i) Demonstrate how stack is implemented using array and write the code (8)
for its operation.

-2-
ii) Show how radix sort is performed using linked list. (8)

17. a) i) Construct expression tree for the given expression (a+b*c)+((d*e+f)*g) (8)
and show inorder, preorder and postorder tree traversals.
ii) Write a routine to delete an element from binary search tree. (8)
(OR)
b) i) Explain the threaded binary tree in detail and mention its limitations. (8)
ii) Represent the given graph using any two graph representation methods. (8)

1 5

2 4

18. a) Write BFS and IFS sequences. Define B tree of order M. Construct a B (16)
tree of order 5 for the following elements:
1,12,8,2,25,5,14,28,17,7,52,16,48,68,3,26,29,53,55,45
(OR)
b) i) Show the result of inserting 13,21,16,24,31,19,68,65,26, and32, one at a (12)
time, into a initially empty Binary Heap and then insert 14 into the heap
and perform deletemin from the heap.
ii) Mention any four applications of priority queue. (4)

19. a) i) Sort the following array of elements using quick sort (8)
{3 1 4 1 5 9 2 6 5 3 5 8}. Show the intermediate results.
ii) Compare and contrast various sorting techniques with respect to memory (8)
space and computing time.
(OR)
b) i) Sort the following sequence of keys using merge sort. (8)
66, 77, 11, 88, 99, 22, 33, 44, 55.
ii) Discuss in detail about external sorting technique. (8)

-3-
Compulsory Question:
20. i) The following values are to be stored in a hash table (8)
25, 42, 96, 101, 102, 162, 197
Describe how the values are hashed by using division method of hashing
with a table size of 7. Use chaining as the method of collision resolution.
ii) What is meant by extendible hashing? When is it useful? Describe the (8)
steps in solved with suitable example.
*****

-4-

Вам также может понравиться