You are on page 1of 6

DATA STRUCTURE & ALGO

BY
MS SEHRISH FIRDOOS

SUBMITTED BY : NOOR SHAHZER

CLASS : BSCS (MORNING)

DEGREE PROGRAM : COMPUTER SCIENCE DEPARTMENT

ROLL NUMBER : RC-306

DEADLINE : 27 November 2022


Lab Task 01:
Create a menu driven program, to form a Circular Queue using array max size =10,
which perform the following operations on queue:

addq( ) // add element into queue delq( ) // delete element from queue.

displayq( ) // display the elements of queue

Solution:-
Lab Task 02:
In this Exercise, you have to take a single string as input. Using this input string,
you have to create multiple queues in which each queue will comprise of separate
word appeared in input string. At the end, you will again concatenate all queues to a
single queue.

Example:

String = “Data Structure and Algo”

Q1 = D → a → t → a

Q2 = S → t → r → u → c → t → u → r → e

Q3 = a → n → d

Q4 = A → l → g → o

At the end concatenate all queues and display them.

Q1 → Q2 → Q3 → Q4

Solution

You might also like