Aditya Shitole Dsu Project

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 12

Annexure-1

IMPLEMENTATION OF QUEUE

#Aims/Benefits of the Microproject :-

1) To learn implementation of Queue


2) To get use to the data structures.
3) To run Queue

#Course outcomes:-
1) Perform basic operations on array
2) Apply different searching and sorting techniques
3) Implement basic operations on queue using array representation.

# Proposed Methodology:-

The topic of the microproject is implementation of queue using linked list. For
this project we first learned about queue and linked list through are regular
lectures. Queue is a container of data items that are inserted and removed
according to the last-in-first-out(LIFO) principle. A Queue has a restriction that
insertion and deletion of element can only be done from only one end of queue
and we can call that position as top & a linked list is data structure consisiting of
collection of nodes in a sequence which is divided in two parts one the data and
second the address of the second node. After learning about these in detailed
through our daily lectures and practicals we formed a group of four members and
divided the work equally. The project was completed with the help of the teacher
some reference books and internet.

# Action Plan:-
Sr. Planned Name of
finished responsible
No. Details of Activity Planned team
date
start date members

1 We form a group of members. 1-7-19 8-7-19 Rushikesh


Pandule
Aditya Shitole
Shantinath
Daltod
Akshay
gaikwad

2 We discussed and selected 15-7-19 22-7-19 Rushikesh


microproject topic. Pandule
Shantinath
Daltod
3 We learnt data structure. 22-7-19 29-7-19 Aditya
Shitole
Shantinath
daltod
4 We learnt to develop and run 22-7-19 29-7-19 Rushikesh
data structure in C Pandule
akshay
gaikwad
5 We learned basics of data 29-7-19 5-8-19 Shantinath
structure like searching and Daltod
sorting. Rushikesh
pandule

6 We created an algorithm. 5-8-19 19-8-19 Rushikesh


Pandule
Aditya Shitole
7 We created a flowchart. 19-8-19 20-8-19 Aditya shitole

8 We learnt using arrays and 26-8-19 9-9-19 Aditya Shitole


structures to create a linked list. Rushikesh
Pandule

9 We learned to about stack and 9-9-19 16-9-19 Rushikesh


linked list and how to Pandule
implement it. Shantinath
Daltod
10 We attended lectures and 16-9-19 23-9-19 Rushikesh
practical’s. Pandule
Aditya
Shitole
Shantinath
Daltod
Akashay
gaikwad
11 We started working on the 16-9-19 23-9-19 Shantinath
requirements for Microproject. Daltod
Rushikesh
Pandule
12 We collected resources 16-9-19 23-9-19 Rushikesh
required. Pandule
Aditya Shitole
13 We developed our C program 23-9-19 30-9-19 Shantinah
code. Daltod
akshay
gaikwad
14 We confirmed that output of 23-9-19 30-9-19 Rushikesh
our code is as per our related Pandule
topic. Shantinath
Daltod
15 We made project report. 7-10-19 14-10-19 Rushikesh
pandule
Akshay
gaikwad

16 We submitted our project. 14-10-19 14-10-19 Rushikesh


Pandule
Shantinath
Daltod
Aditya
Shitole
Akshay
gaikwad

 Resources Required:
Sr.No. Name Of Specificatios Quantity Remarks
resources/material
1 Hardware: Computer Computer (i3-i5 01
System preferable) RAM
minimum 2GB and
onwards
2 Operating System Windows 7 or later 01
version/LINUX
versio 5.0 or Later
version
3 Software Turbo c/c++ version 01
3.0 or later version

 Name of team members with roll no’s

1. Rushikesh Pandule (41)

2. Shantinath Daltod (49)

3. Aditya Shitole (53)

4. Akshay Gaikwad (48)


#Programme:-
#include<stdio.h>
#include<conio.h>
#define max 4
int
q[10],front=0,rear
=-1;
void main()
{
int ch;
void insert();
void delet();
void display();

clrscr();

printf("\nCircular
Queue
operations\n");

printf("1.Insert\n2
.Delete\n3.Displa
y\n4.Exit\n");
while(1)
{
printf("Enter your
choice:");
scanf("%d",&ch);
switch(ch)
{
case 1: insert();
break;
case 2: delet();
break;
case 3:display();
break;
case 4:exit();

default:printf("Inv
alid option\n");
}
}
}

void insert()
{
int x;
if((front==0&&rea
r==max-
1)||(front>0&&re
ar==front-1))

printf("Queue is
overflow\n");
else
{
printf("Enter
element to be
insert:");
scanf("%d",&x);
if(rear==max-
1&&front>0)
{
rear=0;
q[rear]=x;
}
else
{

if((front==0&&rea
r==-
1)||(rear!=front-
1))
q[++rear]=x;
}
}
}
void delet()
{
int a;

if((front==0)&&(re
ar==-1))
{
printf("Queue is
underflow\n");
getch();
exit();
}
if(front==rear)
{
a=q[front];
rear=-1;

front=0;
}
else
if(front==max-1)
{
a=q[front];
front=0;
} else
a=q[front++];
printf("Deleted
element
is:%d\n",a);
}

void display()
{
int i,j;

if(front==0&&rear
==-1)
{
printf("Queue is
underflow\n");
getch();
exit();
}
if(front>rear)
{

for(i=0;i<=rear;i++
)
{

printf("\t%d",q[i])
;
{

for(j=front;j<=max
-1;j++)

printf("\t%d",q[j])
;
printf("\nrear is
at %d\n",q[rear]);
printf("\nfront is
at
%d\n",q[front]);
}
}
}
else
{

for(i=front;i<=rear
i++)
{

printf("\t%d",q[i])
; }
printf("\nrear is at
%d\n",q[rear]);
printf("\nfront is
at
%d\n",q[front]);
}
printf("\n");
getch();
}

You might also like