0% found this document useful (0 votes)
15 views

Module 2 QB

Uploaded by

bhatpratham54
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

Module 2 QB

Uploaded by

bhatpratham54
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Question Bank-Module 2

1. Give the disadvantage of ordinary queue and how it can be solved using circular queue.
Explain with suitable example, how would you implement circular queue using dynamically
allocated array
2. Write insert and delete functions of circular queue.
3. Explain multiple stacks and queues with program.
4. Define Queue. Implement the operations of queue using arrays.
5. What is circular queue? Explain how it is differ from linear queue. Write a C program for
primitive operations of circular queue
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. What is linked list? Explain the different types of linked list with examples.
8.Give a node structure to create a linked list of integers and write a C function to perform the
following.
a. Create a three-node list with data 10, 20 and 30
b. Inert a node with data value 15 in between the nodes having data values 10 and 20
c. Delete the node which is followed by a node whose data value is 20
d. Display the resulting singly linked list.
9. With node structure show how would you store the polynomials in linked lists? Write C
function for adding two polynomials represented as circular lists.
10. Write a C function to add two-polynomials represented as circular list with header node.
11. Write a C function to perform the following i. Reversing a singly linked list ii. Concatenating
singly linked list. iii. Finding the length of the circular linked list. iv. To search an element in the
singly linked list
12. Write a node structure of linked stack. Write a function to perform push and pop operations
on linked stack.
13.Write a function for singly linked lists with integer data, to search an element in the list that is
unsorted and a list that is sorted.
14. Write a node structure of linked queue. Write a function to perform enqueue and dequeue
operations on linked stack

You might also like