You are on page 1of 2

Data Structure

Assignment 2

Stack and Queue

1. What is Stack? Write the algorithm of push and pop operations. Explain its application
also.

2. Write short notes on any two of the following

a. Quick sort
b. Radix sort
c. Bucket Sort
d. Heap Sort

3. What does you men by recursion? How it is possible using stack? Explain through
appropriate example.

4. Define Queue. Write the Insertion and Deletion procedure in queue. Explain Priory
Queue and its application also

5. A recursive function f is shown below what is the value of f(s)?


int f (int x)
{
if (x<2)
return 1;
else
return f(x-1)+f(x-2)
}

6. State the tower of Hanoi problem write recursive algorithm to solve the problem.

7. Convert A+(BxC-(D/E/F)xG)xH into past fix from showing s talk status after every step
in tabular form.

8. What is a priority queue? How can you represent a priority queue in memory?
9. Consider the following circular queue of characters implements as array of six memory
location
Front=2 Rear=3
queue :_AD_ _ _
Where ‘_’ denotes empty call describes the queue as the following o portion take place.
i. Add ‘S’
ii. Add ‘J’
iii. Delete her letters.
iv. Shift toward left to bring all free space to the right side.
Insert MHI and delete one letters

10. What is a circular queue? Explain briefly and implement a queue with the help of doubly
linked list.

You might also like