You are on page 1of 2

Data Structure and its Applications

2​nd​ Assignment Questions


1. What is recursive function? Show that how factorial using for loop is different
from recursive function.

2. Discuss the Tower of Hanoi with example using recursive function. For 3 or 4 Disks.
3. Write a note on Ackermann function/Write Ackermann Function. Solve i) A(2,1)
ii) A(1,3).
4. Explain stacks operations using dynamic arrays.
5. Explain queues operations using dynamic arrays.
6. For the given circular queue shown in Fig. write the values of front and rear in the
table after each specified operation is performed. Queue full empty conditions must be
considered. 0 - 7 indicate the array indices.

7. Give the disadvantage of ordinary queue and how it is solved in circular queue. Explain
with suitable example how you would implement circular queue using dynamically
allocated array.
8. Write a note on dequeue.
9. Define priority queue. Explain in detail the representation of a Priority Queue with
example.

10. Explain multiple stacks and queues.


11. Give the node structure to create a singly linked list of integers and write functions to
perform the following:
i) create a list.
ii) Assume the list contains 3 nodes with data 10,20,30. Insert a node with data 40
at the end of the list.
iii) Insert a node with data 15 between the nodes having data values 10 and 20.
iv) Display the singly linked list.
v) Delete a node with value 20.
12. What are the advantages of doubly linked list over singly linked list? Illustrate with an
example.
13. Write the functions for singly linked list with integer data to search an element in the
list.
14. Write the node structure for linked representation of polynomial. Explain the algorithm
to add two polynomials represented using linked lists.
15. List out the difference between the DLL and SLL. Illustrate with example the following
Operations on a doubly linked list:
i) Inserting a node at the beginning.
ii) Inserting at the intermediate position.
iii) Deletion of a node with a given value.
iv) Search a key element.

16. Write C function to perform the following:


i) Reversing a SLL.
ii) Concatenating SLL.
iii) Finding the length of the list.

17. Write a node structure for linked representation of polynomial. Explain the algorithm to
add two polynomials represented using linked list.

You might also like