Data structures: Linked List implementation of Queue

  Рет қаралды 539,401

mycodeschool

mycodeschool

Күн бұрын

See complete series on data structures here:
• Data structures
In this lesson, we have described linked list implementation of Queue data structure.
See source code here:
gist.github.co...
Lessons on Time complexity analysis:
• Time Complexity Analysis
Lesson on Implementation of Linked list in C/C++:
• Linked List - Implemen...
For practice problems and more, visit: www.mycodeschoo...
Like us on Facebook: / mycodeschool
Follow us on twitter: / mycodeschool

Пікірлер: 230
@fcortesjp
@fcortesjp 10 жыл бұрын
Wow.. amazing... thank you so much.. It can't be clearer.. and the considerations about time of execution are a plus on this video. Awesome job.. I'm taking this class at a University in Colombia (south america) but the material I have to study from is light years away from your considerations and dynamics seen on your video.. all my kudos to you!.. this just furthers my admiration from India
@mycodeschool
@mycodeschool 10 жыл бұрын
Thanks a lot Francisco Cortes for your encouraging words. :)
@danielk8452
@danielk8452 5 жыл бұрын
so did you make it to google?
@theknowledgegate4762
@theknowledgegate4762 4 жыл бұрын
See Visualization of Stack Queue And Linked List on java kzbin.info/www/bejne/n36rk5drgbiJsLM
@amritaanshnarain7524
@amritaanshnarain7524 3 жыл бұрын
@@danielk8452 LOL
@okaybossiamonyoutubeakkskd
@okaybossiamonyoutubeakkskd 2 жыл бұрын
@@danielk8452 did you make to google?
@hehhehdummy
@hehhehdummy 8 жыл бұрын
You teach at such a high quality. I'm thankful that you have made these videos. Your voice is pleasant as well.
@varshithkemmasaram2115
@varshithkemmasaram2115 3 жыл бұрын
R u from india?
@Naveenkumar-sn1et
@Naveenkumar-sn1et 2 жыл бұрын
Nobody can explain this much clearly on a topic like Data Structure. Your videos are still continuing to be a hope for many students around the world
@mahmoudfadaly8074
@mahmoudfadaly8074 Жыл бұрын
Frankly I have never seen an explanation so easy and simple like what you have done in this video , its as u were reading my thoughts , any question that pops into my mind , I find you answering it , thank you one more time and I hope you see my comment after all these years and make ur day
@ShankarRam23
@ShankarRam23 9 жыл бұрын
These video lectures rival the ones produced by several other foreign channels and outclasses them in several aspects. Best CS channel on youtube.
@rraj2095
@rraj2095 8 жыл бұрын
the best and most precise explanation till far i've seen on internet..thanks a ton
@davidhilbert6830
@davidhilbert6830 10 жыл бұрын
Your one video is enough to understand. You are really good teacher. I should really thank you , you have actually helped me clear my college practicals. Your way of understanding is very good, I have seen many videos on KZbin yours was the best. I will recommend your videos for my friends as well. I kept on reading COMPUTER SCIENCE BY SANGEETA ARORA, THE BOOK IS A WASTE.
@harshupreti1526
@harshupreti1526 6 жыл бұрын
isnt it sumita arora ?? XD just asking !!
@S3verance
@S3verance 6 жыл бұрын
thats what i was thinking to lol
@VictorJunyiWang
@VictorJunyiWang 10 жыл бұрын
Thanks for the great uploading, succinct and easy to grasp. Just one typo in the code : struct Node* temp = (struct Node*)malloc(sizeof(struct Node*)); should be: struct Node* temp = (struct Node*)malloc(sizeof(struct Node)); I believe this is just a typo, however, might give confusion to beginners. :)
@mycodeschool
@mycodeschool 10 жыл бұрын
Yeah.. it should be sizeof(struct Node) .. Thanks for pointing out. :)
@aravindrajeev4594
@aravindrajeev4594 6 жыл бұрын
Exactly what I needed before my practical exam🙌🙌👌👌😌
@nirajabcd
@nirajabcd 10 жыл бұрын
Beautiful! I am learning a lot from your videos. I have tired many books and other online courses but they can't be matched with yours. Hats off to you. Can't wait for more tutorials on graphs and other advanced topics.
@JZX619
@JZX619 5 жыл бұрын
This playlist is really amazing. God bless you for helping students with their careers.
@Gurpreetsingh-fz4fq
@Gurpreetsingh-fz4fq 5 жыл бұрын
bro he is no more.....
@SonuSonu-tk5pk
@SonuSonu-tk5pk 7 жыл бұрын
sir ji aapke baare me jitna kahe utna kaam hai....kabhi milne ka maan karta hai..lekin california aana thoda time lagega... sir u are lord of teaching....
@cjbantillo8142
@cjbantillo8142 5 ай бұрын
This topic made me cry, but thank you so much for having these lectures for free it really helps
@aptitudepointiit-bhu5358
@aptitudepointiit-bhu5358 2 жыл бұрын
This channel made the basic concepts crystal clear, thus all these follow-up questions are self-doable now. 💛
@aupairindo4085
@aupairindo4085 8 жыл бұрын
The best java tutorial on youtube! great job! Many greetings from Schwitzerland!
@SuperJAIMISH
@SuperJAIMISH 8 жыл бұрын
That was explained way better than any teacher that has ever taught me! Thanks alot mate!
@manvendranagaich7377
@manvendranagaich7377 8 жыл бұрын
Thanks a lot , u have been able to put across the complex subject in a very subtle and simplified manner, it has saved a lot of time.
@marucado2539
@marucado2539 6 жыл бұрын
You really helped me! Thank you very much. Even i don't know english very well, i could understand you. Thank you!!
@ruis2345
@ruis2345 8 жыл бұрын
Thank you for explaining these abstract process in a intuitive way. So amazing course.
@magadheera7
@magadheera7 10 жыл бұрын
You guys are awesome!! I can bet these are the best free lessons on the internet.. Your touch of underlying concepts and basics make you unique.. You will be big ones some day.. Thank you!!
@divyanshagarwal993
@divyanshagarwal993 6 жыл бұрын
Pleasant voice,crystal clear explanation. Why can't my teacher be like this?
@pritammane1594
@pritammane1594 6 жыл бұрын
Your linked list explanations are too gud. U just saved my tomorrow's sem exam. THANK YOU SO MUCH !!!!!!!!!
@piyaliroy8485
@piyaliroy8485 7 жыл бұрын
wish he was a teacher at my college.. love his videos !! thanks a LOT !!
@zokna
@zokna 8 жыл бұрын
If I am correct, the if(front==NULL && back==NULL) check in Enqueue() can be reduced to simply check the following condition if(front==NULL). This would also make the check at line 4 at 12:27 obsolete, since the "front" pointer will automatically be set to NULL, when the last node is dequeued, given the fact that the "last node"->next = NULL. This is of course only true if we perform a IsEmpty() check at the first line in Dequeue().
@shohag402
@shohag402 9 жыл бұрын
All of your data structure videos are awesome. It could not have been better in my sense. I am eagerly waiting for your Graph tutorials...........
@mohitdaga2356
@mohitdaga2356 6 жыл бұрын
Amazing tutorial. This is the best data structure series on the Internet. But,there is one thing I feel you should check in the dqueue function, when (front==rear), this might also mean that there is ONE ELEMENT present in the queue. So first we need to delete this and then (front=rear=NULL).
@sindhug7130
@sindhug7130 2 жыл бұрын
when you say "might also mean", is there a different meaning of front==rear? I mean does it mean anything else apart from the fact that there is only one node in the queue?
@mrigendrapatel
@mrigendrapatel 6 жыл бұрын
Crystal clear explanation. You rock man!!! :)
@RajAnand2311
@RajAnand2311 9 жыл бұрын
Thanx for putting on this video. You just saved me from failing in xams.
@shekharsharma3329
@shekharsharma3329 3 жыл бұрын
I am preparing for my college placement and your videos are a great source to learn.
@ntlzz93
@ntlzz93 9 жыл бұрын
when you finished any subject , you should have supplied more applications for this lesson . Like when finished lesson about stack or other lesson , you could introduce about application of stack such as Tower of Ha Noi , 8 Queens. ( I don't know exactly ) Thank you very much about your tutorials .
@vamshitangudu1728
@vamshitangudu1728 8 жыл бұрын
hi, in Data structures: Linked List implementation of Queue, I think the implmentation of en-queue has might need to be modified. the video shows struct Node* temp = (struct Node*)malloc(sizeof(struct Node *)); but instead it should be struct Node* temp = (struct Node*)malloc(sizeof(struct Node));
@ar_tushar
@ar_tushar 7 жыл бұрын
Yes! u r right!
@abhishekahirrao4271
@abhishekahirrao4271 5 жыл бұрын
Both work when implemented
@nityanandamuri5230
@nityanandamuri5230 6 жыл бұрын
I clearly understood this topic! Thanks a lot!!! Can u also give the algorithm for circular queues using linked list too??????
@joshuakoehler6457
@joshuakoehler6457 4 жыл бұрын
A note to those who attempt the code and test. There is an error in his Enqueue function. For allocating space for a new link, the line should read struct Node* temp = malloc(sizeof(struct Node)); The cast on the right side (e.g. struct Node* next to malloc) is redundant. The other issue (a much bigger one) is that he malloced a pointer to a structure, instead of the structure itself. It should read malloc(sizeof(struct Node)) NOT struct Node* ! This will only allocate enough memory for a POINTER to a link, and not the link itself, which will cause an error with some compilers (Visual Studio C++ included). This thread explains this undefined behavior stackoverflow.com/questions/59418706/heap-corruption-detected-in-visual-studio-but-program-runs-fine-in-another-c-co
@Hhong_1120
@Hhong_1120 Жыл бұрын
Still so good aftetr 9 yeat, its the best and easy understandable explaination in the youtube for me.
@KimberleyNaris
@KimberleyNaris 6 жыл бұрын
this is so much easier than how my lecturer taught it...thanks a lot😊
@tenealaspencer4150
@tenealaspencer4150 7 жыл бұрын
This was awesome! The explanation of time complexity was great as well!
@surajbisht4111
@surajbisht4111 4 жыл бұрын
brother your videos really helped me a lot with data structure.. keep making these videos..
@VaLeEBP
@VaLeEBP 8 жыл бұрын
Hi, this is the best explanation that I got on internet, I want to do this but with local variables, do you have any code example?
@jigidhakan7678
@jigidhakan7678 7 жыл бұрын
Thank u sir your every videos r awsm...keep it upp..
@MegaRED555
@MegaRED555 7 жыл бұрын
these videos are so good. Thank you for the great work.
@RatIceCream
@RatIceCream 2 жыл бұрын
Thanks for posting!
@asmafarook
@asmafarook 4 жыл бұрын
Thanks for all this material this is great help. Would it be possible to do a video on hash tables and their implementation as well? I couldn’t find any good video on it. Thank you
@toyganyilmaz
@toyganyilmaz 4 жыл бұрын
excellent clear explanations, thanks for sharing your knowledge
@vasugoyal5587
@vasugoyal5587 4 жыл бұрын
thank you brother for the huge help...ur videos are so smooth to grasp
@gauravjoshi4865
@gauravjoshi4865 4 жыл бұрын
For me you are best Sir
@julistracke3917
@julistracke3917 7 жыл бұрын
I can finally understand, thank you so much! Subscribed!
@harikachalla7616
@harikachalla7616 9 жыл бұрын
Awesome sir...... It's so helpful
@MrBalakoteswar
@MrBalakoteswar 6 жыл бұрын
I loved your way of explanation, simply super excited.
@ThisIsMMI
@ThisIsMMI 2 жыл бұрын
Thank you sir, you really teach well
@rizmandesu
@rizmandesu 3 ай бұрын
wow so easy so understand, thank you sir
@abhishek_sengupta
@abhishek_sengupta 5 жыл бұрын
Best explanation I could find
@chochokun9352
@chochokun9352 8 жыл бұрын
I like how you explain things :) they are clear and simple
@shama.niyazi
@shama.niyazi 3 жыл бұрын
Thank you so much brother 🙏🙏 .. I was struggling 😭... Now understanding 😁🙏
@gauravjoshi4865
@gauravjoshi4865 4 жыл бұрын
Thank you So much for this effort it helped me a lot to get Data Structure Concept
@mohitvarma1012
@mohitvarma1012 4 жыл бұрын
The best explanation possible!!
@olatunjikehinde1081
@olatunjikehinde1081 9 жыл бұрын
good job, it really makes the topic simpler. thanks
@JohnSamuelM-nt3vx
@JohnSamuelM-nt3vx 7 жыл бұрын
fabulous teaching.!!!!! i understood very clearly the concepts u taught. thank u................
@SugamMaheshwari
@SugamMaheshwari 9 жыл бұрын
brother you explain it so well ,thanks a lot!
@aniketsinghvats767
@aniketsinghvats767 2 жыл бұрын
Lol these videos are so helpful even in 2022
@Francesco_AP_
@Francesco_AP_ Жыл бұрын
i just had a 2 hour lecture but this video was way more healpfull lol
@anandkrishnan1996
@anandkrishnan1996 10 жыл бұрын
ur awesome and now i can able to understand about linked list and this queue implementation thanks a lot for this video as it is going to help me for the exams i have tomorrow keep up the good work all the best
@richasharma1447
@richasharma1447 4 жыл бұрын
thanks a lot ,these lectures were very helpful to me .Can u make another playlist on algorithms
@abhishekahirrao4271
@abhishekahirrao4271 5 жыл бұрын
13:27 3rd line of the dequeue function it should be - if(rear=NULL) return; as the queue then would be unfilled. Front=NULL doesn't make any sense.
@city5joy
@city5joy 5 жыл бұрын
WOW AMAZING! THANK YOU!! I like your style of teaching! May God bless you
@sepidehbahrami5223
@sepidehbahrami5223 6 жыл бұрын
thank you , this video helped me to understand queue.
@zornitsa25
@zornitsa25 9 жыл бұрын
Great explanation! Thank you very much :)
@krishanudutta2943
@krishanudutta2943 3 жыл бұрын
Great Lecture it was your explanation is really great.. thanks a lot
@deshpandeyogini5736
@deshpandeyogini5736 6 жыл бұрын
best explaination... concepts are cleared ... thankyou.,....
@fashiondvlog6584
@fashiondvlog6584 5 жыл бұрын
Thnq soo much sir...it made me understood easier and simple..Wish me good luck for ma board exams🤗
@ilhomsadriddinov3627
@ilhomsadriddinov3627 4 жыл бұрын
Great explanation.
@akniazi001
@akniazi001 6 жыл бұрын
Hi, this video lecture i think need a little modification, AS here, front and rear are pointing the same position where in definition always memory size is N-1 and if front and rear is equal at the start means that queue is empty and if it found during insertion it shows the overflow message. so always one cell will be empty where our front pointer will point. But in video both are pointing to one cell where it has value as well.
@soumithjavvaji3310
@soumithjavvaji3310 6 жыл бұрын
even my hod couldn't have taught clearer than this.Amazing videos.Try to upload stack using and queue and queue using stack sir(just a suggestion)
@vishalreddy3531
@vishalreddy3531 7 жыл бұрын
very helpful..till date the best explanation
@laharianegama5004
@laharianegama5004 5 жыл бұрын
very well taught.Can't thank u enough.
@snoudoubts1745
@snoudoubts1745 2 жыл бұрын
I need some more explanation please: How do we know if a queue is empty by simply checking (rear === null) ? Also in dequeue, why are we setting front and rear to null if (front === rear) ? Thank you!
@mohitbv2331
@mohitbv2331 7 жыл бұрын
thank you very much for the clear explanation.
@wareshakhan5740
@wareshakhan5740 9 жыл бұрын
Excellent explanation ..your all videos are veryyyyyy helpful thankx alott
@vipulsharma1408
@vipulsharma1408 8 жыл бұрын
Sir , Can u explain the concept behind "(rear+1)%N" and "(Front+1)%N" ? In your previous video.
@ilanaizelman3993
@ilanaizelman3993 8 жыл бұрын
Awesome video. Good explanations and code, thank you very much!
@Akash-hq1ju
@Akash-hq1ju 7 жыл бұрын
nice video to clear concept
@bolu3307
@bolu3307 5 жыл бұрын
Python Implementation class Node: def __init__(self,data): self.data = data self.next = None class Q: def __init__(self): self.front = self.rear = None def enQ(self,val): val = Node(val) if self.empty(): self.front = self.rear = val else: self.rear.next = val self.rear = val def deQ(self): if self.empty(): return else: top = self.front self.front = self.front.next return top.data def empty(self): if self.front==None or self.rear==None: return True else: return False
@theknowledgegate4762
@theknowledgegate4762 4 жыл бұрын
See Visualization of Stack Queue And Linked List on java kzbin.info/www/bejne/n36rk5drgbiJsLM
@akashmaheshwari7060
@akashmaheshwari7060 6 жыл бұрын
You are great... it can't be clearer..
@pavithraarumugam2359
@pavithraarumugam2359 6 жыл бұрын
Amazing explanation sir👌👏..looking for more videos from you on Data structures
@Alex-mv3ht
@Alex-mv3ht 7 жыл бұрын
Thank you ! Finally understood it
@dgsdggs
@dgsdggs 10 жыл бұрын
helped me finished my project thank you
@jitendersinghrathore7061
@jitendersinghrathore7061 10 жыл бұрын
Really..Really Awesome explanation
@gomuhamji1
@gomuhamji1 8 жыл бұрын
Thank you so much... It will very help for me.
@assam7846
@assam7846 9 жыл бұрын
Thank you very much for this beautiful video...Keep it coming...
@nancyr8940
@nancyr8940 7 жыл бұрын
thank u soo much for ur videos .....its really helpful for me
@onomeovedje3915
@onomeovedje3915 10 жыл бұрын
Hi can you please upload a lecture on graphs and its implementation. That will be really helpful. Your videos have been really helpful. Thanks in advance
@vidyapc9561
@vidyapc9561 7 жыл бұрын
superb videos for learning
@HuthaifaMady1992
@HuthaifaMady1992 9 жыл бұрын
Simple and awesome, Thank you ,,
@atulbhardwaj9337
@atulbhardwaj9337 11 жыл бұрын
Hi can u please upload some lectures on TREES and GRAPHS also.....it will be very helpful..... very nice videos...Thank you in advance....
@mycodeschool
@mycodeschool 11 жыл бұрын
Hi Atul, We will upload lessons on Trees and graphs soon. Stay tuned.
@SagarKumar-wp7ld
@SagarKumar-wp7ld 8 жыл бұрын
Please make a video ASAP on doubly queue
@ACE-cd5mq
@ACE-cd5mq 8 жыл бұрын
Thank you so much for ur awesome videos
@tusharjajodia9077
@tusharjajodia9077 7 жыл бұрын
We are assuming front as the first node of list and a rear as the last node of the list. Can we consider rear in first and front in the last and have the condition satisfied(Time complexity O(1)) if yes How???? How to travel to the pre node of front node. which we need in Dequeuing hope you got what I mean to say
@maxmillianshukuru8611
@maxmillianshukuru8611 8 жыл бұрын
great tutorial...helped me much
@aditichandra5049
@aditichandra5049 3 жыл бұрын
In queue, we follow FIFO,i.e., first in first out. So while dequeuing, why are we deleting the last node first instead of the first node and then updating the head?
@Dibyendu_K
@Dibyendu_K 9 жыл бұрын
Its very helpfull......Thanks alot,,,,,,,
@shreyasrivastava7712
@shreyasrivastava7712 5 жыл бұрын
Thank u sir
@gowthamreddyuppunuri4549
@gowthamreddyuppunuri4549 4 жыл бұрын
AT 11:45,I identified && i think it is struct Node* temp(struct Node*)malloc(sizeof(struct Node));
Data structures: Introduction to Trees
15:50
mycodeschool
Рет қаралды 1,4 МЛН
Data structures: Array implementation of Queue
14:59
mycodeschool
Рет қаралды 883 М.
Incredible: Teacher builds airplane to teach kids behavior! #shorts
00:32
Fabiosa Stories
Рет қаралды 11 МЛН
🍉😋 #shorts
00:24
Денис Кукояка
Рет қаралды 3,8 МЛН
Inside Out 2: ENVY & DISGUST STOLE JOY's DRINKS!!
00:32
AnythingAlexia
Рет қаралды 15 МЛН
L1. Introduction to Stack and Queue | Implementation using Data Structures
1:05:06
3.3 Stack implementation using Linked List | Data Structures and Algorithm Tutorials
27:01
Data structures: Binary Tree
16:17
mycodeschool
Рет қаралды 1,4 МЛН
Doubly Linked List - Implementation in C/C++
15:21
mycodeschool
Рет қаралды 586 М.
Linked List Implementation of Stacks (Part 1)
9:24
Neso Academy
Рет қаралды 220 М.
Learn Linked Lists in 13 minutes 🔗
13:24
Bro Code
Рет қаралды 308 М.
Data Structures: Linked List implementation of stacks
10:58
mycodeschool
Рет қаралды 636 М.