1 (a)
What are the uses of template functions?

2 M

1 (b)
What is dynamic memory allocation? Name and explain the operator used to allocate and deallocate memory dynamically.

4 M

1 (c)
Explain formula - based linear list representation and write a C++ program for the same using template functions.

10 M

1 (d)
Why is linked representation preferred over formula based linear list representation.

4 M

2 (a)
What are special matrices? Explain in detail.

6 M

2 (b)
Write a store and retrieve function for a diagonal matrix.

6 M

2 (c)
Write a C++ program to find the sum of two sparse matrices.

8 M

3 (a)
What is stack? Write the abstract data type of a stack.

4 M

3 (b)
Write a C++ program for linked stack from a chain class.

8 M

3 (c)
Write a C++ recursive function for towers of Hanoi and explain in detail.

8 M

4 (a)
Write a C++ program to perform the following operations on a linked queue:

i) To insert element from the rear end

ii) To delete element from the front end

iii) To display queue content

i) To insert element from the rear end

ii) To delete element from the front end

iii) To display queue content

10 M

4 (b)
What is queue? Explain formula based queue representation.

10 M

5 (a)
List the operations to be performed on a directory and write dictionary abstract data type.

4 M

5 (b)
Illustrate and explain with an example fast searching of a sorted chain using skip list representation.

10 M

5 (c)
Compare hashing with chains and hashing with linear open addressing.

6 M

6 (a)
What are essential differences between a binary tree and tree? List the properties of binary trees.

6 M

6 (b)
Write a recursive routine that can print the contents of a binary tree in preorder, in order and post order.

6 M

6 (c)
i) Write the pre-order, in-order and post-order expression for the following tree shows in Fig. Q6(c) below:

ii) What is the height of the tree shown in figure?

:!MAGE-

ii) What is the height of the tree shown in figure?

:!MAGE-

8 M

7 (a)
What is a max heap? Explain insertion into a max heap and deletion from a max heap.

6 M

7 (b)
Explain melding two max HBL Ts and also write a C++ function for melding two leftist trees.

10 M

7 (c)
What is priority queue? Write abstract data type for max priority queue.

4 M

8 (a)
Write C++ function to perform the following operations on a binary search tree:

i) Inserting an element.

ii) Deleting an element

iii) Searching on element.

i) Inserting an element.

ii) Deleting an element

iii) Searching on element.

12 M

8 (b)
Explain m-way search trees.

8 M

More question papers from Programming in C++