4.4 Circular Queue in Data Structure | Circular Queue using Arrays in C | DSA Tutorials

preview_player
Показать описание
In this lecture I have described circular queue implementation using arrays as well as analyzed the drawback of Linear Queue. I have written C program for implementation of queue using arrays.

******************************************
See Complete Playlists:

**********************************************

Connect & Contact Me:

#jennyslectures
#datastructures
#circularqueue
#ugcnet
#course
Рекомендации по теме
Комментарии
Автор

I was searching here and there, and finally got a crystal clear concept of the circular queue.
This also made me realize the mistakes I have done in learning the Linear queue.🙏🏽

Sovit
Автор

I have never understood an algorithm and simply liked it as this.
You are the best I've seen👌.
Congrats Prof Jenny on this work👏👏.

shadracknjuguna
Автор

We need more Guru's like you because in college all they teach is how to complete the whole syllabus in a very efficient way.
You explain it clearly and practically. I understood the concept quickly that I didn't understand by our faculty prof. They just excel at taking salaries and teaching in traditional ways, which is invaluable for us.
Hats off to ya!

shivanshvish
Автор

Ma’am you are honestly the best teacher thank you so much I am going to pass my course because of you much appreciation!!!!

antgr
Автор

BY watching this video, I remembered one of my favorite teacher who teaches dedicatedly like really an expert. You are a professional dedicated and expert in teaching crystal clear concepts. Thank you so much mam.😇

lifekool
Автор

I can't say thank you enough, this is the night before my exam and your video just helped me A LOT! I hope you doing well.

retrohead
Автор

I would like to thank you for all the efforts you put into your videos just to make the life of us(students) better,
i have been watching and following your videos for some time now and have seen that no one teaches the way you do and
thank you for helping us and making our concepts just like yours i.e, clear as crystal !!!

utsavjain
Автор

Thank you Jenny! This video is so helpful and your explanations are detailed, , clear and concise. I love how you traced out each and every instance of the values as they went through the array. Keep up the great work!

mahinulislam
Автор

You are just superb ma'am!!!
I've been watching this DSA playlist and I've become a fan of yours.
Thank you so much ma'am for teaching me this valuable knowledge.

ketangaikwad
Автор

Ma'am u are a wonderful teacher. I like how u explain concepts with all the possibilities of occurrences. Kuddos to ur dedication. Thankyou so much for these videos ma'am.

juhiajwani
Автор

What a great video indeed mam! Thank you so so so much mam :) Anyone who is looking for there concepts to get cleared, this video is the way to go!

aryanmaniyar
Автор

You are the reason that i passed the exam. Thanks a lot, ma'am. 🙏🙏

littleorange
Автор

A request to all viewers... Please share this channel 🥺.. Her teaching skills deserves more views

sudharsands
Автор

You are simply superb. Awesome way of teaching the DS.

pravinbudage
Автор

Really your concepts are really clear. It's very easy to understand from your video

biswamohandwari
Автор

include<stdio.h>
#include<conio.h>
#include<stdlib.h>
#define size 5
int cq[size];
int front=0, rear=0;
void display()
{
int i;
printf("\n The circular queue is : ");
if(front<=rear)
{
for(i=front;i<=rear;i++)
printf(" %d ", cq[i]);
}
else
{
for(i=front;i<=size;i++)
printf(" %d ", cq[i]);
for(i=1;i<=rear;i++)
printf(" %d ", cq[i]);
}
}
void enq(int item)
{
if(front==((rear%size)+1))
printf("\n Queue is full");
else
{
if(front==0)
{
front=rear=1;
cq[rear]=item;
}
else
{
int next=(rear%size)+1;
if(next!=front)
{
rear=next;
cq[rear]=item;
}
}
}
display();
}
void deq()
{
if(front==0)
printf("\n Queue is empty");
else
{
int item=cq[front];
if(front==rear)
front=rear=0;
else
front=(front%size)+1;
printf("\n Deleted %d", item);
}
display();
}
void main()
{
int item, m;
printf("\n\t\tCIRCULAR QUEUE");
while(1)
{
printf("\n\n 1.Enqueue\n 2.Dequeue\n 3.Display\n 4.Exit");
printf("\n Enter your choice : ");
scanf("%d", &m);
switch(m)
{
case 1 :if(front==((rear%size)+1))
printf("\n Queue if full");
else
{
printf("\n Enter the item to be enqueued : ");
scanf("%d", &item);
enq(item);
}
break;
case 2 :deq();break;
case 3 :display();break;
case 4 :exit(1);
default:printf("\n Invalid entry");
}
}
}

phineasferb
Автор

Thank you mam so much for explaining it in such a easy way... You are always helping me whenever I face difficulty in solving certain programs...☺️☺️

VIVardhan
Автор

FINALLY I understood this after browsing over the internet and going through all my notes trying to figure out wth is this. thank you

emma-ubuq
Автор

Ma'am your videos really help me in the exam time
As the result of it I have score 70% in my diploma exams held by bter Jodhpur really for are god to me.
Thanks a lot ma'am

muditmathur
Автор

such a great explanation. code works perfectly. totally satisfied . thank you mam.

marksachinms