4.2 Implementation of Queue using Arrays | Data Structures & Algorithm Tutorials

  Рет қаралды 766,080

Jenny's Lectures CS IT

Jenny's Lectures CS IT

Күн бұрын

In this lecture I have described array based implementation of queue data structure. I have written C program to implement queue using arrays.
DSA Full Course: https: • Data Structures and Al...
******************************************
See Complete Playlists:
C Programming Course: • Programming in C
C++ Programming: • C++ Complete Course
Python Full Course: • Python - Basic to Advance
Printing Pattern in C: • Printing Pattern Progr...
DAA Course: • Design and Analysis of...
Placement Series: • Placements Series
Dynamic Programming: • Dynamic Programming
Operating Systems: // • Operating Systems
DBMS: • DBMS (Database Managem...
*********************************************
Connect & Contact Me:
Facebook: / jennys-lectures-csit-n...
Quora: www.quora.com/...
Instagram: / jayantikhatrilamba
#jennyslectures, #datastructures #queue #queueimplementation

Пікірлер: 457
@thengakola6217
@thengakola6217 3 жыл бұрын
literally every student have exam tomorrow and this lecture is helpful........ dont repeat what everyones saying
@saiswaroopkunda8055
@saiswaroopkunda8055 3 жыл бұрын
But I'm having now exam listening to this class😆
@nemothekitten3994
@nemothekitten3994 3 жыл бұрын
umm i have viva in half an hour i have to write sheduling algorithms
@chagantisrichandana8070
@chagantisrichandana8070 3 жыл бұрын
🤣🤣 exactly true thenga
@deepaksinghranawat4929
@deepaksinghranawat4929 2 жыл бұрын
Apun ke bhi exam h aaj
@arenaofgaming2471
@arenaofgaming2471 2 жыл бұрын
Nop today 🥲
@muhammadahsanriaz9969
@muhammadahsanriaz9969 4 жыл бұрын
Hi Mam ! I am from Pakistan . Thank You So much for teaching us in outstanding way. I respect and love all the KZbin Tutors of India Although other departments are better in Pakistan but Department of Cs and IT is not so good and updated in the universities here, so through your lectures we can learn the updated course ,you helped us a lot ....Thanks Again.
@pratikkumbhkar9729
@pratikkumbhkar9729 2 жыл бұрын
Really want person like you that make relations friendly ❤❤
@muhammadahsanriaz9969
@muhammadahsanriaz9969 2 жыл бұрын
@@pratikkumbhkar9729 Thanks bro.
@adarsh_kr_maurya
@adarsh_kr_maurya 2 жыл бұрын
Love ❤️ from India 👍
@flakky626
@flakky626 9 ай бұрын
💣💥
@itzritam2127
@itzritam2127 8 ай бұрын
oh so according to you anything is best in Bhikaristan?
@aditishaw2697
@aditishaw2697 3 жыл бұрын
I just love how she teaches with so much enthusiasm and repeats every point like a thousand times so things really fit into your head. Thank you so much ma'am for your videos.
@adwaithvinod5705
@adwaithvinod5705 11 күн бұрын
yeh exactly the repetition of points is really helpful which a lot of teachers dont realize and mostly wont cause they dont wanna put in the work
@akhilbille2670
@akhilbille2670 4 жыл бұрын
Maam if a lecturer like u are in college then no one miss u r cls u r really great in subject
@FrontLineEngineer
@FrontLineEngineer 3 жыл бұрын
Sahi batao 😳
@venkatbvbcet
@venkatbvbcet 2 жыл бұрын
I'm technical lead have almost 10 years of experience, still i loved to watch your videos, excellent teaching skill you have really appreciated..🤗
@JAYPATEL-ih2qm
@JAYPATEL-ih2qm 4 жыл бұрын
I have found the Right Place to Learn DSA in KZbin . Thanks 🙌
@shabanajafar4631
@shabanajafar4631 5 жыл бұрын
Thanks alot mam. You are benefited every student in the country. Pls keep following the same. You have a subscribers in each corner of the india. Kudos to your lecture!
@MegaMicraman
@MegaMicraman Жыл бұрын
I need to brush up on data structures for work. These lectures are top quality. From a mature student.
@122_ankitkumargupta8
@122_ankitkumargupta8 4 жыл бұрын
Mam... Plz put the whole lectures of ds in a single playlist.... I couldnot find the best lecture of ds... But aftr watching ur videos.... I can say u r the best one
@nagmanazrin8760
@nagmanazrin8760 3 жыл бұрын
the only teacher i have seen giving u a strong look like are u getting my point and i rotating my head ya ya i'm getting it😂lol a real feeling of being in a class.Thanku so much mam🤗
@MrSiddharth999
@MrSiddharth999 3 жыл бұрын
Love from Bangladesh. What I have learned after watching your videos only in 6 hours, my varsity couldn't teach me data structure in 6 months of the semester.
@adithyaraj8984
@adithyaraj8984 4 ай бұрын
tq so much mam, im paying lacks of fees to college which is of no use , but your golden lecture which is of no cost means a lot to me mam Tq once again
@zulfiqaraliahmed6667
@zulfiqaraliahmed6667 5 жыл бұрын
Upload some leetcode problem & interview problems (product based companies) You are a great teacher
@nastranzahra8829
@nastranzahra8829 4 жыл бұрын
i have an exam tomorrow and your this lecture literally helped me a lot ma'am. Thank you so much.
@jaimaabhawaniji
@jaimaabhawaniji 5 жыл бұрын
Mam trust me ,i was about to write this queue data structures as a lecture series on every video you have uploaded, as a comment ,so that you may decide to do so and here you are 💯💯💯😊 !!!! Thanks alot.Trees like b+ etc will also be appreciated.
@sankalpa_gunasekara
@sankalpa_gunasekara 2 жыл бұрын
Thank you so much, Ma'am, for saving my entire Data Structures & Algorithms subject! God bless you and May the triple gems bless you !!
@ayushvasani5489
@ayushvasani5489 4 жыл бұрын
I can not have word to say anything about you Such a great explanation Mind-blowing
@devaldhamsania7034
@devaldhamsania7034 2 жыл бұрын
Ma'am you just made this really easy, till now I'm face problem in making program but you just make it really simple, thanks a lot and keep making such stuff it really helps us. Thank you one again 😊
@dmangee2
@dmangee2 2 жыл бұрын
Thank you for the great explanation, these are the best Data Structure & Algorithm videos available on the internet.
@ruturajpawar
@ruturajpawar 4 ай бұрын
1 month before exam 😎
@1neyt167
@1neyt167 Ай бұрын
@@ruturajpawar 1 day before exam
@GreenPanther-hn5qe
@GreenPanther-hn5qe Ай бұрын
@@ruturajpawar 12 hrs before exam
@gg-uzi
@gg-uzi 17 күн бұрын
23:06 before the exam
@muchhadiyakaushik5163
@muchhadiyakaushik5163 10 күн бұрын
1 hours before exam
@JNM_7.7
@JNM_7.7 9 күн бұрын
On exam 😂❤
@cyanider069
@cyanider069 Жыл бұрын
Note : This code worked for me. if there is any mistake, please let me know. CODE: #include using namespace std; #define N 5 int queue[N]; int front = -1; int rear = -1; void display() { if (front == -1 && rear == -1) { cout
@lamishajoshi7480
@lamishajoshi7480 10 ай бұрын
Declare front and rear as pointer and point them to array naming queue
@vikrampandey7860
@vikrampandey7860 4 жыл бұрын
i dont know why you are in such a hurry to say bye and take care :), jokes apart your videos are really helpful, thanks alot
@usmanzahid7627
@usmanzahid7627 Жыл бұрын
Happy teacher's day Miss .I like your lecture so much.Thank you🥰 for this simple and great lectures. Love From 🇵🇰 wish you health and long life💞 .Regards to your family😁.
@user-mx6yi8vi6m
@user-mx6yi8vi6m 6 ай бұрын
Mam iam doing mca on correspondence with this videos I learned perfectly
@pooyataheri8092
@pooyataheri8092 4 жыл бұрын
dequeue and peek usually have a return type, not just printing the value of front in a void function.
@Trueaccount.
@Trueaccount. 10 ай бұрын
Empty means underflow ,na
@abhishekchakravorty234
@abhishekchakravorty234 4 жыл бұрын
Very good explanation Ma'am, thank you so much! However, it would benefit us even more if you could explain to us how to integrate all these functions with the main function.
@siri-ul7gr
@siri-ul7gr Жыл бұрын
not a teacher gives the eye to eye contact like you
@veereshtechchannel8762
@veereshtechchannel8762 4 жыл бұрын
U r explanation is superb mam and i like u r teaching skills so much mam, when compare to study classes u r explanation is 99.99%is perfect mam
@code4vlogger652
@code4vlogger652 4 жыл бұрын
This is one of the best place to learn about DSA .Thank you ma'am
@princeujjawal829
@princeujjawal829 2 жыл бұрын
Mam seriously ur teaching and explanation is next level 😊♥️ Thank you for the amazing lecture 💯
@HopeNHopes
@HopeNHopes 2 ай бұрын
I have a ds exam in 2 days and here i am ;) Studying CE in IUST btw Love and appreciation from iran❤️‍🔥🇮🇷
@rjhgworrioar9753
@rjhgworrioar9753 2 жыл бұрын
I have exam 2hours later and I'm watching now. 😂
@Prince-ol5zk
@Prince-ol5zk 9 ай бұрын
You’re a great teacher. You clarified my doubts. I was confused why enqueue is O(1) and you used a great visual representation 🎉
@TechyAyush
@TechyAyush 6 ай бұрын
Understood every single bit! Thank you so much mam.
@shreyabanik6986
@shreyabanik6986 3 жыл бұрын
Ma'am your way of explaining is very easy and understandable. Thank you ❤️
@abhijitzende7292
@abhijitzende7292 3 жыл бұрын
Suppose we have declared queue (array) of size 10 and by doing enque we made our queue full now we dequeue an element from queue which will be done from front end ... Now queue is not full because index 0 of queue is empty ... But even though we cannot enque because rear is at MAX-1 and it will show Overflow .... isn't it wastage of memory
@kalagahemani4933
@kalagahemani4933 2 жыл бұрын
Ofcourse it is. Thats the main disadvantage of queues. To overcome that problem circular queues were employed .
@thecloudterminal
@thecloudterminal Жыл бұрын
Thank you for great explanation and putting so much effort mam 🙏
@vivekpandey794
@vivekpandey794 4 жыл бұрын
Good evening mam, you are really doing good work for cs students. Specially You have a good art of teaching technical concepts.
@hbpatel1976
@hbpatel1976 4 жыл бұрын
How about making a video on Priority Queue (with array & linked list implementation)?
@anchalpatel10
@anchalpatel10 3 жыл бұрын
Yeah!!
@devangmathur5809
@devangmathur5809 4 жыл бұрын
Thank you so much mam. You are doing a lot of hard work for us!!🙏
@srinivasan6352
@srinivasan6352 4 жыл бұрын
Best guidance for data structures. Really to say i was very much feared of this subject but after seeing ur lectures, data structures became my most interesting subject ma'am. Thank u so much ma'am . U keep rocking:)
@user-pb7ht8oy9b
@user-pb7ht8oy9b 7 ай бұрын
// Online C compiler to run C program online #include #include #define N 5 int a,front=-1,rear=-1; void enqueue(); void dequeue(); void peek(); void display(); int queue[N]; int main() { int choice,ch; while(ch=1){ printf("Enter your choice: 1.Enqueue 2.Dequeue 3.Peek 4.Display: "); scanf("%d",&choice); switch(choice) { case 1: enqueue(); break; case 2: dequeue(); break; case 3: peek(); break; case 4: display(); break; default: printf(" Invalid Choice : "); } printf(" Do you want to continue? "); scanf("%d",&ch); } } void enqueue() { if(front==-1 && rear==-1) { front=rear=0; printf(" Enter the number :"); scanf("%d",&a); queue[rear]=a; } else if(front==N-1) { printf("Queue Overflow"); } else{ printf(" Enter the number :"); scanf("%d",&a); rear++; queue[rear]=a; } } void dequeue() { if(rear==-1 && front==-1) { printf(" Empty "); } else { printf("Deleted item is %d",queue[front]); front++; } } void peek() { int item; item=queue[front]; printf("Top/Peek item is %d",item); } void display(){ int i; for(i=front; i
@richaatrey
@richaatrey 4 жыл бұрын
Superb mam agr aap mujhe btech m pdhate to sach m life bn gyi hoti ab tak bhut awesome pdhate ho mam really love the way you teach💓💓💓💓💓
@yashwanthm2925
@yashwanthm2925 2 жыл бұрын
Empty = mpt
@priyanshusaini8180
@priyanshusaini8180 8 ай бұрын
Mam love your teaching method❤ its great how you teach every topic to the depth and still makes everything clear and simple amazing ❤❤❤
@dilleshwarip2789
@dilleshwarip2789 6 ай бұрын
Mam u r so cute and teaching also ❤ I loved it 😍
@bhaskarp8326
@bhaskarp8326 2 жыл бұрын
Super mam your explanation is too excellent and ur way of explanation is easily understandable thank you mam I understood easily this concept
@VK_BRANDING
@VK_BRANDING 9 ай бұрын
adv congo for 2M🥰🥰🥰
@AdityaKumar-tm5mb
@AdityaKumar-tm5mb 4 жыл бұрын
best best best....you made DS really simple :)
@semrana1986
@semrana1986 Жыл бұрын
Very nicely explained with a fully worked out example
@anurudhsingh3397
@anurudhsingh3397 3 жыл бұрын
Thank you so much mam ,you explains every topic very well...❤️
@rawatmotorsguptakashi1577
@rawatmotorsguptakashi1577 3 жыл бұрын
Great way of explaining really hats off to you jenny.
@fizakhan4517
@fizakhan4517 2 жыл бұрын
Yrrrrr lots of love for you ❤❤❤ you are awesome😍😍 You put sooo much efforts After watching your videos my all confusions just vanishedddd😂 God bless you ma'am❤
@october3518
@october3518 2 жыл бұрын
I have a different excuse....I have an assignment to complete this week n I gotta study to complete it lol 😀 thankyou for the wonderful lectures!!
@mohdtarik4803
@mohdtarik4803 2 жыл бұрын
Your teaching style owsome mam Very thankful mam From Kanpur 💕💕💯 But mam I think In dequeue function there should be a temporary variable that can be hold the value of front And then we increament temp variable that's it Thanks 😊 mam
@himanshugupta2160
@himanshugupta2160 4 жыл бұрын
Nice explanation ma'am! Most of the topics being covered and cleared to me as well...
@RollingTheDepth
@RollingTheDepth 4 жыл бұрын
I wish, Hmare college ki madam bhi itni cute hoti so, appreciations for ur beauty(1) Now Point to be noted is that I am not here as a tharki(2) So, I must be thanking you coz u explained sort algorithms very well. I am a beginner in data structures (starting) so, You explained them very well(3) Then I watched some of your other videos and you teach in a very simple language. So, for beginners like us, It's like blessings after going through the jargons on websites like g4g or codeacad. so thanku(4) . Now just 1 request/suggestions: Please organise data structures and algorithms seperately coz It's confusing. Also orgainse ot topicwise. It can help us a lot THANKS FOR SUCH BETTER TEACHING ON KZbin FOR FREE!!(Rare Thing) System.out.println("Happiness and love should be the functions without any arguments 😊");
@hthree7857
@hthree7857 4 жыл бұрын
it's free for us, not her. There is no Sandeep Maheshwari in every alley
@Understanding_the_world_withme
@Understanding_the_world_withme 4 жыл бұрын
Maam you are one of my best teachers.. Thank you very much for these videos. Stay safe and healthy maam. Love from me.
@surbhisaraf3267
@surbhisaraf3267 3 жыл бұрын
Mam ur too good In data structure.i would like to thank you first...bcz mam u have make vdo in such easier language which we can understood properly what is the concept.. Thank you so much mam....again
@ashisharya1536
@ashisharya1536 4 жыл бұрын
Thanku mam for understanding DS&A in the simplest way.
@anshgupta8860
@anshgupta8860 8 ай бұрын
in the dequeue operation when front ==rear for the element -1,it will set front and rear as -1 ,so here i think -1(last element) will never be printed
@ajeetsingh4986
@ajeetsingh4986 Жыл бұрын
I believe it is best to shift every element of the array one place to the left in the case of de-queueing rather than moving the front pointer. If I'm mistaken, kindly point it out. Other from this, there's no denying that your videos are excellent ☺
@sruthimajhi5610
@sruthimajhi5610 Жыл бұрын
But that seems so irrelevant
@adarsh_kr_maurya
@adarsh_kr_maurya 2 жыл бұрын
Thank ma'am ,this vedio is very effective for us.. 🙏
@UdayKumar-ph4xg
@UdayKumar-ph4xg 14 күн бұрын
One hour before exam >>>>
@mohammadshahabeezurrahman6646
@mohammadshahabeezurrahman6646 3 жыл бұрын
Mam literally awesome thanks for the lecture. Much love to our respected teacher Jenny Aka Jayanti mam.😊😇🙏
@EnglishwithSudha
@EnglishwithSudha 6 ай бұрын
Great ma'am thanks a lot
@srivanikothavadla4606
@srivanikothavadla4606 4 жыл бұрын
I got the best lecture from KZbin ... Thanks alot
@isharaperera419
@isharaperera419 3 жыл бұрын
Your teachings are masterpiece ma'am!
@code-heads
@code-heads Жыл бұрын
Thank you so much, have been struggling to grab the concept since different sources where providing different concepts of queue.
@PB30K
@PB30K 4 жыл бұрын
Very well explained..really Helped me.. thanks a lot ma’am
@ShambhuVibe
@ShambhuVibe 4 жыл бұрын
Your fan from Nepal.Thank you.I got right platform to learn DSA
@saurabhsaxena1992
@saurabhsaxena1992 3 жыл бұрын
I have a lot of love for nepali guys. I have two friends in my college. Please remove this dull communist govt, otherwise ur country will get disturbed a lot religiously as well as economically
@MichaelDouglas-sr5re
@MichaelDouglas-sr5re 4 жыл бұрын
Thanks for making Queue simple and clear...nice job
@SrinivasRao-ev7pn
@SrinivasRao-ev7pn Жыл бұрын
You are such a down to earth person
@virendramane7818
@virendramane7818 4 жыл бұрын
the way u teach is very good.....but in delete operation if we still increasing front end then at one time the situation will happen i.e front>rear from this condition we cant enter a single element in list so we remove this problem by shifting....
@farazkhan496
@farazkhan496 7 ай бұрын
It very helpful mam❤
@chetnadua6783
@chetnadua6783 2 жыл бұрын
Very clear and to the point concepts... This is worth watching ❤️❤️❤️❤️
@stylingcastle6347
@stylingcastle6347 3 жыл бұрын
You are a life saver mam!! Respect to you For such a genius video
@fgmalang219
@fgmalang219 2 жыл бұрын
Very helpful videos your just amazing on this field keep it up just try to make videos in urdu also that will help us alot thanks jaan love you❤️🔥
@krishnachaitanya-md8wl
@krishnachaitanya-md8wl Жыл бұрын
jenny mam rocks..pls join in gvp college , AP as a lecturer
@prathmeshpawar5591
@prathmeshpawar5591 4 жыл бұрын
All the videos are very helpful for us to clearify concepts of data structure, Thank you mam !
@jaiom83
@jaiom83 4 жыл бұрын
Hi Jenny, firstly i would like to thank you for explaining the concept in such a simple words. Here I have problem with your dequeue method because -1 will never gets printed so what about that last element in queue. So last element is unreachable according to your code. Please correct me, if I have misunderstood.
@codewithdrv7521
@codewithdrv7521 4 жыл бұрын
For explanation checkout #codewithdrv
@atirekmanidiggal5140
@atirekmanidiggal5140 Жыл бұрын
WATCHING BEFORE EXAM
@sudhirverma4790
@sudhirverma4790 4 жыл бұрын
Overflow will be when use try to enque on the 5th position...upto 4 the user can enqueue
@allhdmoviescene1294
@allhdmoviescene1294 Жыл бұрын
this algo will save time but not memory because even f and r = -1 there are elements stored in the array which is useless until overwrite
@EBKCS_MOKSHASHARMA
@EBKCS_MOKSHASHARMA 3 жыл бұрын
ghum fir ke m aapke paas he aajaatu hu KZbin me best vdo bro✨
@thahauvaiseak2502
@thahauvaiseak2502 3 жыл бұрын
Hai mam...I have a doubt... At the time of enqueue is there need to declare rear=front=-1? bcz we have already checked in if condition...
@gattineniakhil1990
@gattineniakhil1990 Жыл бұрын
Good teaching,your videos are helpful to so many students
@venkateshrajendran2362
@venkateshrajendran2362 4 жыл бұрын
Let say array length is 3 , rear and front are in index 2 nd now i call enQ() . Technically queue is not full but having one element in it so queue should allow me to add element. Rather it will say overflow. Please correct me if I'm wrong. And your lectures are very clear. Thanks for making videos, Jenny. And your smile at end is so cute. 😅
@pranaychoubey9706
@pranaychoubey9706 3 жыл бұрын
u can modify the if condition for that.
@akanshagupta4493
@akanshagupta4493 3 жыл бұрын
Reallly mammm i like ur teaching way , u make every concept too much easy and interesting 😍😍😍
@pappujha9357
@pappujha9357 2 жыл бұрын
Thanks a lot, Ma'am...You are my saviour
@amanchoudhary276
@amanchoudhary276 2 жыл бұрын
Mam there is a issue in dequeue function, suppose we define an array of size 3, and we insert only 1 element i.e. first element as 5 (now,front=0&rear=0) and then dequeue but it will give no error but blank space as result but we must get 5 as dequeue elemet. It is beacause during dequeue we give else if condition that if front=rear make front=rear=-1 and in else if only one condition will be executed so, no result will be given in all situation whent rear=front but not at -1
@aniruthsuresh6749
@aniruthsuresh6749 Жыл бұрын
thats a nice observation ; prolly to overcome that we can give an extra condition like front !=0 so your if condition will look something like this :: if(front ==rear && front!=0) :: hope that helps
@dharani.p1884
@dharani.p1884 2 жыл бұрын
really superb mam I understood this concept
@utfuntv6744
@utfuntv6744 2 жыл бұрын
hello mam mai aap ki vedio kuchh dino se dekh raha hu ,app ki saari concept mujhe achhe se samajh aa raha hai ,thakyou for the content of data stracture . ek aur baat mai aap lagti bahut cute hai mai to kabhi kabhi aap ki vedio ko pose kar ke aap hi dekhta rah jata hu 😘😘😘
@SR-rd3fw
@SR-rd3fw 4 жыл бұрын
Thank you so much for the tutorials Ma'am, they benefit beginners like me.
@bhargavsaivedrapolu9845
@bhargavsaivedrapolu9845 Жыл бұрын
Thank you for your wonderful teaching maam.It really helped me a lot.Lots of love from NIT Patna❤️😁😇🤗
@shayanahmed1418
@shayanahmed1418 2 жыл бұрын
Excellent explanation. To the point.Thanks a lot.
@musictone5159
@musictone5159 2 жыл бұрын
very useful vedio
@vakhariyajay2224
@vakhariyajay2224 2 жыл бұрын
Thank you very much. You are a genius. 👍👍🔝🔝👌👌🙏🙏
@SAymanShariff
@SAymanShariff 3 жыл бұрын
Plz make a video of how to implement multiple queues in a single array
4.3 Queue Implementation using Linked List in C | Data Structure Tutorials
19:47
Jenny's Lectures CS IT
Рет қаралды 462 М.
managed to catch #tiktok
00:16
Анастасия Тарасова
Рет қаралды 39 МЛН
OMG what happened??😳 filaretiki family✨ #social
01:00
Filaretiki
Рет қаралды 12 МЛН
Top 6 Coding Interview Concepts (Data Structures & Algorithms)
10:51
3.2 Implementation of Stack using Array | Data Structure and Algorithm Tutorials
17:27
4.1 Queue in Data Structure | Introduction to Queue | Data Structures Tutorials
20:19
RBI Internship 2025 | Earn Rs. 45,000/Month | Best Internships for Students
7:39
Jenny's Lectures CS IT
Рет қаралды 52 М.
QUEUE IMPLEMENTATION USING ARRAYS - DATA STRUCTURES
28:10
Sundeep Saradhi Kanthety
Рет қаралды 139 М.
Pointers and dynamic memory - stack vs heap
17:26
mycodeschool
Рет қаралды 1,4 МЛН
Power of Heap
11:13
Techdose
Рет қаралды 85 М.
Introduction to Circular Queues
10:43
Lalitha Natraj
Рет қаралды 83 М.