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

  Рет қаралды 793,363

Jenny's Lectures CS IT

Jenny's Lectures CS IT

Күн бұрын

Jennys Lectures DSA with Java Course Enrollment link: www.jennyslect...
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

Пікірлер: 465
@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 3 жыл бұрын
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 11 ай бұрын
💣💥
@itzritam2127
@itzritam2127 9 ай бұрын
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 Ай бұрын
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 5 жыл бұрын
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 😳
@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!
@122_ankitkumargupta8
@122_ankitkumargupta8 5 жыл бұрын
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
@JAYPATEL-ih2qm
@JAYPATEL-ih2qm 4 жыл бұрын
I have found the Right Place to Learn DSA in KZbin . Thanks 🙌
@zulfiqaraliahmed6667
@zulfiqaraliahmed6667 5 жыл бұрын
Upload some leetcode problem & interview problems (product based companies) You are a great teacher
@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.
@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.
@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 😊
@lonewolf16916
@lonewolf16916 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 !!
@dmangee2
@dmangee2 2 жыл бұрын
Thank you for the great explanation, these are the best Data Structure & Algorithm videos available on the internet.
@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.
@usmanzahid7627
@usmanzahid7627 2 жыл бұрын
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😁.
@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
@pooyataheri8092
@pooyataheri8092 4 жыл бұрын
dequeue and peek usually have a return type, not just printing the value of front in a void function.
@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
@YmounikaReddy-i4x
@YmounikaReddy-i4x 7 ай бұрын
Mam iam doing mca on correspondence with this videos I learned perfectly
@princeujjawal829
@princeujjawal829 2 жыл бұрын
Mam seriously ur teaching and explanation is next level 😊♥️ Thank you for the amazing lecture 💯
@shreyabanik6986
@shreyabanik6986 3 жыл бұрын
Ma'am your way of explaining is very easy and understandable. Thank you ❤️
@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.
@thecloudterminal
@thecloudterminal Жыл бұрын
Thank you for great explanation and putting so much effort mam 🙏
@devangmathur5809
@devangmathur5809 4 жыл бұрын
Thank you so much mam. You are doing a lot of hard work for us!!🙏
@Prince-ol5zk
@Prince-ol5zk 10 ай бұрын
You’re a great teacher. You clarified my doubts. I was confused why enqueue is O(1) and you used a great visual representation 🎉
@priyanshusaini8180
@priyanshusaini8180 9 ай бұрын
Mam love your teaching method❤ its great how you teach every topic to the depth and still makes everything clear and simple amazing ❤❤❤
@TechyAyush
@TechyAyush 8 ай бұрын
Understood every single bit! Thank you so much mam.
@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
@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
@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
@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💓💓💓💓💓
@RollingTheDepth
@RollingTheDepth 5 жыл бұрын
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
@ruturajpawar
@ruturajpawar 5 ай бұрын
1 month before exam 😎
@1neyt167
@1neyt167 2 ай бұрын
@@ruturajpawar 1 day before exam
@GreenPanther-hn5qe
@GreenPanther-hn5qe 2 ай бұрын
@@ruturajpawar 12 hrs before exam
@gg-uzi
@gg-uzi Ай бұрын
23:06 before the exam
@muchhadiyakaushik5163
@muchhadiyakaushik5163 Ай бұрын
1 hours before exam
@JNM_7.7
@JNM_7.7 Ай бұрын
On exam 😂❤
@siri-ul7gr
@siri-ul7gr Жыл бұрын
not a teacher gives the eye to eye contact like 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 .
@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 Жыл бұрын
Declare front and rear as pointer and point them to array naming queue
@meenakship993
@meenakship993 27 күн бұрын
can i know which compiler u used
@cyanider069
@cyanider069 27 күн бұрын
@@meenakship993 I forget the version but any gcc cpp compiler will do the work.
@PRACHIIKHAR
@PRACHIIKHAR 8 ай бұрын
// 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
@DakshGolchha
@DakshGolchha 14 күн бұрын
@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....
@surbhisaraf3267
@surbhisaraf3267 4 жыл бұрын
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
@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.
@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❤
@dilleshwarip2789
@dilleshwarip2789 7 ай бұрын
Mam u r so cute and teaching also ❤ I loved it 😍
@ashisharya1536
@ashisharya1536 4 жыл бұрын
Thanku mam for understanding DS&A in the simplest way.
@adarsh_kr_maurya
@adarsh_kr_maurya 2 жыл бұрын
Thank ma'am ,this vedio is very effective for us.. 🙏
@rawatmotorsguptakashi1577
@rawatmotorsguptakashi1577 3 жыл бұрын
Great way of explaining really hats off to you jenny.
@fgmalang219
@fgmalang219 3 жыл бұрын
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❤️🔥
@code-heads
@code-heads Жыл бұрын
Thank you so much, have been struggling to grab the concept since different sources where providing different concepts of queue.
@anshgupta8860
@anshgupta8860 9 ай бұрын
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
@Hamzahameed-ht6jv
@Hamzahameed-ht6jv 3 күн бұрын
Mam thanks a lot your lecture very helpful for me 🥰😍
@october3518
@october3518 3 жыл бұрын
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!!
@baikannikitha1897
@baikannikitha1897 3 жыл бұрын
Nice explanation ma'am! Most of the topics being covered and cleared to me as well...
@PB30K
@PB30K 4 жыл бұрын
Very well explained..really Helped me.. thanks a lot ma’am
@srivanikothavadla4606
@srivanikothavadla4606 4 жыл бұрын
I got the best lecture from KZbin ... Thanks alot
@bhargavsaivedrapolu9845
@bhargavsaivedrapolu9845 Жыл бұрын
Thank you for your wonderful teaching maam.It really helped me a lot.Lots of love from NIT Patna❤️😁😇🤗
@SAymanShariff
@SAymanShariff 3 жыл бұрын
Plz make a video of how to implement multiple queues in a single array
@isharaperera419
@isharaperera419 3 жыл бұрын
Your teachings are masterpiece ma'am!
@thahauvaiseak2502
@thahauvaiseak2502 4 жыл бұрын
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...
@stylingcastle6347
@stylingcastle6347 3 жыл бұрын
You are a life saver mam!! Respect to you For such a genius video
@prathmeshpawar5591
@prathmeshpawar5591 4 жыл бұрын
All the videos are very helpful for us to clearify concepts of data structure, Thank you mam !
@gattineniakhil1990
@gattineniakhil1990 Жыл бұрын
Good teaching,your videos are helpful to so many students
@vakhariyajay2224
@vakhariyajay2224 2 жыл бұрын
Thank you very much. You are a genius. 👍👍🔝🔝👌👌🙏🙏
@atharvkumbhar1463
@atharvkumbhar1463 Жыл бұрын
23:06 min successfully invested. ....❤
@SrinivasRao-ev7pn
@SrinivasRao-ev7pn Жыл бұрын
You are such a down to earth person
@farazkhan496
@farazkhan496 9 ай бұрын
It very helpful mam❤
@harishr3153
@harishr3153 11 ай бұрын
Thank you so much mam your teaching was great mam and useful to me for tomorrow exam mam
@sudhirverma4790
@sudhirverma4790 4 жыл бұрын
Overflow will be when use try to enque on the 5th position...upto 4 the user can enqueue
@dharani.p1884
@dharani.p1884 3 жыл бұрын
really superb mam I understood this concept
@dhrubajyotighosh4646
@dhrubajyotighosh4646 8 ай бұрын
Mam in the void enqueue function can I write Queue front= max-1 it instead of queue rear=max-1
@VK_BRANDING
@VK_BRANDING 10 ай бұрын
adv congo for 2M🥰🥰🥰
@pravinbudage1830
@pravinbudage1830 2 жыл бұрын
if you would have meet us in the college, then it would have been great. Good way of explaining the things on whiteboard.
@harikaburagapu
@harikaburagapu Жыл бұрын
Thank mam for your great efforts.....really this lecture was great helpful to us...
@nallayahanushan7906
@nallayahanushan7906 Ай бұрын
Thank you and I love you a lot for your help mam💝💖
@AdityaSingh-in6ce
@AdityaSingh-in6ce 2 жыл бұрын
do we have to write #include at beginning of programs in stacks , linked list or queues or just #define N
@AjayYadav-dr5us
@AjayYadav-dr5us 4 жыл бұрын
Osm mam ,, your teaching mechanism is so glamorous,Anxom , love you mam
@aadinarayana6385
@aadinarayana6385 4 жыл бұрын
Its really ossum it helped me a lot this is one of the easiest way of explaination
@wahidegulzar9705
@wahidegulzar9705 Жыл бұрын
In for loop can we use .... for (i=front; i
@Trueaccount.
@Trueaccount. 11 ай бұрын
Empty means underflow ,na
@syzygy5998
@syzygy5998 Жыл бұрын
Mam I think that last code is N%(rear+1)
@yathisharadhya9789
@yathisharadhya9789 Жыл бұрын
If rear is intialzed with -1 then both front and rear are pointing to same end of queue. Kindly check insertion happens along same side and deletion too.
@BinaryBazaar501
@BinaryBazaar501 4 жыл бұрын
super method of teaching
@yashwanthm2925
@yashwanthm2925 2 жыл бұрын
Empty = mpt
@shayanahmed1418
@shayanahmed1418 2 жыл бұрын
Excellent explanation. To the point.Thanks a lot.
@mitgenius
@mitgenius 5 жыл бұрын
So great !! Thanks for this
@ronatkumarmuni4076
@ronatkumarmuni4076 2 жыл бұрын
Board mein samjha ne ke baad Program ko C compiler mein run karke dikhana tha na
@harshil8784
@harshil8784 3 жыл бұрын
You did a great job
@9893011111
@9893011111 5 жыл бұрын
Last vdo you said that enqueue, dequeue should be done in O(1) complexity, Why ? why after dequeue, we are not shifting items towards front being 0th position. this way CAPACITY will be utilized !? (As happens in movie booking window -- real life example) saw some other videos they are saying moving front to front++ should not be done, is wrong. appreciate your work.
@YusufKhan-vn8ur
@YusufKhan-vn8ur 4 жыл бұрын
Great job👍👍.....and i like the way you look into the camera 😍
@-AshwithaAlladi
@-AshwithaAlladi 3 жыл бұрын
Thank u so much mam 🙏🙏 ur way of explanation is awesome
@jatinhirani5888
@jatinhirani5888 3 жыл бұрын
hello,mam in display function you add a variable int i int the beginning then we can also define in for loop just like for(int i= front; i
@RoamingRabindra
@RoamingRabindra Жыл бұрын
Thank you Maam🥰🥰from Nepal😊
@UniqueBansal44
@UniqueBansal44 5 жыл бұрын
Nice video mam .
@carrompoolgames1997
@carrompoolgames1997 3 жыл бұрын
Mam your subject is sooo good mam. Keep going on mam. 👍🤗🥳🙏👌🥰👏👏👏
@divyanshusinghrajput3159
@divyanshusinghrajput3159 Жыл бұрын
what a nice teaching skill ma'am
@BhumiKumari-j8u
@BhumiKumari-j8u Ай бұрын
You are amazing 🙏
@kundu6158
@kundu6158 2 жыл бұрын
very very very helpful videos mam 👍🏻👍🏻👍🏻 thanku mam 🙏🙏🙏
@usmanshabbir8516
@usmanshabbir8516 3 жыл бұрын
Thanks mam you have solved my problem keep it up....
@ravalsinhal8078
@ravalsinhal8078 Жыл бұрын
Best Quality learning thanks mam
@aayushverma9476
@aayushverma9476 5 жыл бұрын
very helpful videos mam keep doing it.
@Advancedmathematics333
@Advancedmathematics333 3 жыл бұрын
You're genius really
4.3 Queue Implementation using Linked List in C | Data Structure Tutorials
19:47
Jenny's Lectures CS IT
Рет қаралды 477 М.
4.1 Queue in Data Structure | Introduction to Queue | Data Structures Tutorials
20:19
ПРИКОЛЫ НАД БРАТОМ #shorts
00:23
Паша Осадчий
Рет қаралды 6 МЛН
小丑妹妹插队被妈妈教训!#小丑#路飞#家庭#搞笑
00:12
家庭搞笑日记
Рет қаралды 37 МЛН
GIANT Gummy Worm Pt.6 #shorts
00:46
Mr DegrEE
Рет қаралды 86 МЛН
Самое неинтересное видео
00:32
Miracle
Рет қаралды 2,9 МЛН
4.7 DEQUE in Data Structure | Introduction to DEQue - Double Ended Queue
12:45
Jenny's Lectures CS IT
Рет қаралды 335 М.
QUEUE IMPLEMENTATION USING ARRAYS - DATA STRUCTURES
28:10
Sundeep Saradhi Kanthety
Рет қаралды 140 М.
DSA & ₹1.2 Crore Per Annum Jobs - The Truth? (No Offence)
12:22
CodeWithHarry
Рет қаралды 656 М.
5.1 Tree in Data Structure | Introduction to Trees | Data Structures Tutorials
29:17
Jenny's Lectures CS IT
Рет қаралды 1,3 МЛН
L1. Introduction to Stack and Queue | Implementation using Data Structures
1:05:06
3.2 Implementation of Stack using Array | Data Structure and Algorithm Tutorials
17:27
Data structures: Array implementation of Queue
14:59
mycodeschool
Рет қаралды 881 М.
ПРИКОЛЫ НАД БРАТОМ #shorts
00:23
Паша Осадчий
Рет қаралды 6 МЛН