What is Queue Data Structure ? | Queue Operations | Data Structure & Algorithms (DSA) | Part - 1
HTML-код
- Опубликовано: 23 мар 2019
- Understand the working of a Queue data structure and all its operations.
Definition : Queue is a linear data structure which operates in a First IN First OUT or Last IN Last OUT.
It is named queue as it behaves like a real-world queue, for example - queue(line) of cars in a single lane, queue of people waiting at food counter etc.
Queue is an abstract data type with a bounded (predefined) capacity.
It is a simple data structure that allows adding and removing elements in a particular order.
The order is FIFO(First IN First OUT) or LILO(Last In Last Out).
Following are the standard operations of Queue DS -
1. Enqueue
2. Dequeue
3. isFull
4. isEmpty
5. count
---------------------------------------------------------------------------------------------
Full DSA playlist - • Introduction to Data S...
Full Article on our official website - simplesnippets.tech/what-is-q...
---------------------------------------------------------------------------------------------
Support Simple Snippets by Donations -
Google Pay UPI ID - tanmaysakpal11@okicici
PayPal - paypal.me/tanmaysakpal11
---------------------------------------------------------------------------------------------
Simple Snippets Official Website -
simplesnippets.tech/
Simple Snippets on Facebook -
/ simplesnippets
Simple Snippets on Instagram -
/ simplesnippets
Simple Snippets on Twitter -
/ simplesnippet
Simple Snippets Google Plus Page -
plus.google.com/+SimpleSnippets
Simple Snippets email ID -
simplesnippetsinfo@gmail.com
For More Technology News, Latest Updates and Blog articles visit our Official Website - simplesnippets.tech/
#queue #queuedatastructure #datastructures #queueds #queueoperations
Hey Guys, if you want more such tech educational videos on this channel then please support me by subscribing to this channel & also share it with your friends as it helps me create more content just for you ✌
Found this channel today, Your work is truly appreciable brother. 🔥🤘
Welcome to Simple Snippets Family!
for me this is the Best Data Structure playlist ...in youtube.. easily understandable and the visual representation is too good ...
the Indian guy helping me out more than my uni teachers, keeping going thanks
Always 🤟😊
Where are you from?👀
bro i can understand very nicely each and every topic...thank u from my bottom of my heart.
Most welcome bro. I am very happy to hear this from you. Please share this video with your other friends too 😇👍
underrated utube channel
I was having so much problem as to where will I be able to learn all the DS, but you really made it up very easy, thank you very much sir ..whole heartedly thank you very much
I know I'm commenting on almost every video... But dayummmmm..... You outdo yourself everytime!!
Thank you very much!!!
Thank you so much Chetna, this was really a great compliment. Will keep outdoing myself as long as I have such wonderful support from you and our Simple Snippets Family. Please do share the videos with your friends too. Thats the biggest help and support for our channel :-)
You are the only one who took time to explain it first rather than jumping to code!
Thanks alot...Your videos mean so much to us❣
Your videos are so well presented and so much clarity of concepts - thanks for sharing really amazing
best playlist ever. Too much underrated. You deserve more subs
best in world
i watched it before and second time i did't get this type of describe in any other video so keep it up buddy too good
Thank you so much brother 😁 please share this entire DSA video tutorials with your friends buddy 😊 that will be the biggest help and support ✌️
@@SimpleSnippets shourly
bro your videos are short and to the point. Really helpful
Thank you for explaining it in such a detailed manner!
Thanks a lot for providing this amazing content that's also for free.... It means a lot brother..... For the first time in my 2 years of college... I have understood what queue is and how it's actually implemented.... Thanks a lot.
Most welcome buddy. I'm very happy these videos are helping you 🤘 Keep growing 😊
amazing bro thanks by heart .now i think i am able to learn DSA
After watching your videos,now i really think ,i will implement it 😎🤩 ,thanks from bottom of my heart
best channel for c++ programmer
It was really helpfull i understood every concept!!!!!
You make it so easy bro, I am a non Comp Sci guy and its still so easy for me to get this...thankss!!!
That's the best feedback ❤️ glad you liked it. Please do share the videos with your friend too🤟
bro this is the best explanation of queue that I have came across
Hehe thanks Mahesh 🤟 very happy to know this. Please do share the channel with your friends & ask them to join our Subscriber family too😊 that will be the biggest help & support 🤟
Excellent explanation once again.
So easy to understand. Thank you ❤🙏
This is the only indian channel where i can relax to watch DS else I go for some foreigners because you know in India there are many channels which are doing same stuff again and again with boaring techniques , but this bro Tanmay came with lit energy with also fab English speaking and awesome techniques i hooked up watching video of stack and now I'm going to do binge watching and binge working for DS practice , peace out and thanks again bro Tanmay 🤟🤟🤟
Wow thank you so much Pirthavi for such wonderful feedback. Really very glad to know that my DSA videos are helpful. Please so support me by sharing our videos with your friends too 🙏
I have already share this video to my 5-6 friends and they gave me a fab positive reaction , this is the only channel where we get implementation of data structure with c++ language .....
In first time in my life i understood algos so precisely and didnt get bored.thanks for creating this masterpiece bhaya.Seriously you are a legend.....
Thank you so much buddy. Really happy to hear this. It would mean a lot if you could please share our channel and videos with your friends too ✌
bro thanku so much from the bottom of my heart. now i can sleep well in the class.
Hahahaha most welcome bro. Sleep tight 😂😴
Just don't get caught 😜
Fantastic video! I have one question. After performing out last dequeue operation, the last read value is not cleared out. I added a arr[front] = 0; in my dequeue "else if" so that when I read the last queued item (when front == rear), that value is read, then cleared. Does this track?
Thanks for the amazing explanation
Happy to learn from u.keep doing this for ever😉
Thank you so much buddy🙏 And yes many more videos will be coming soon ✌
awsome bro ,keeo it up
Lol, kaha Naresh it channel ki bookish knowledge and kaha humara bhai sakpaal, love you bhai
Thank you so much Kavan 🙏
Well explained thank you :)
Thank you so much for this much clear explanation! 🤩
Most welcome buddy, do share the video with your friends too ✌️ that's the biggest support you can do for me 😊
Excellent work sir👌🏻👌🏻👌🏻🥰🥰💯💯💯
Hi everyone! I think in enQueue( ) operation there should not be an elseif part, instead, you should place an else part, and in that there can be an if and else function. because in the video, arr[rear]=value will be executed rather arr[] is full or not.
here is my approach. correct me if I'm wrong.
void enQueue(int element) {
if (isFull()) {
cout
looks like yours works too but his's more... readable in a sense. You can more easily tell what his code is saying compared to yours
Awesome Bro, may you prosper in life
Most welcome my friend 😊 thanks for the support always. I would request you to keep sharing our channel and content with your friends 😊✌️
At 20:40 wont we make arr[front]=0 ?
Thankyou !!!
superb
@SimpleSnippets, sup, a few questions.
1. If the `front` variable can only be equal to `-1` when the queue is empty, then why do you check for `rear`, too, in `isEmpty()`?
2. What is faster: checking for `front < 0` or for `front == -1`? I mean not for C++ specifically, but for popular CPU arches. From what I understand, comparison of two numbers is typically done in the CPU in the ALU. But do compilers make it a moot point because they somehow change the Time Complexity of the comparisons on the higher level so even if on the ALU level it is faster to check for `-lt` (less then) than for equality, the workings of the higher level add other algorithms above it and the total Time Complexity of the underlying algo and of the higher-level algo turns out to be the opposite: that the check for equality is faster, because the higher-level algo is more Time-Complex than the underlying algo, so it grows faster and works slower on large input. Pls correct me if I'm saying bs, I'm still figuring this out.
3. Why don't you put `x = arr[front]` BEFORE the if-else construct in `dequeue()`? I mean at this point (after the check for emptiness) it will execute either way.
Thanks for the vid. Just discovered you playlist thanks to your Big-O notation introduction, it was very awesome and I'm still kind of dazed I got it. NOW I HAVE THE POWER TO RULE THE WORLD!
P. S. Your vids are very nice, I like how you exaplain things in simple terms, as you would to a friend in the kitchen, and also take care to highlight stuff in different colors, it helps understanding a lot, I kind of categorize the stuff you talk about right away when you use different colors, wish more people would do that, especially in term definitions like you do. And also SPECIAL BIG-PUMPKIN THANKS for the practical examples both in Tech and Real Life, I guess you know just like I do what it's like to live in the world of mostly purely theoretical study materials of any significant depth and be a practically minded person at the same time. You're life saver. This rocks!
great video
so can i shift all element after the dequeue?
bro thankyou so much your teaching style is amazing and i like this thx bro for understanding queue
It's my pleasure. Please support me by sharing the videos and our channel with your friends too. Thats the biggest help and support you can provide 😇
@@SimpleSnippets ya bro i have also share with my IT friends
Thank you brother....
The way you explain 😍😍😍....
Hehe thanks bro ♥️😊 means a lot to me✌️
Ah bro first I thought that what he is saying then I see your video again then I understand your oncepts
thanks for the video
Make a video series for aptitude and logical reasoning now a days it's very useful for cracking interviews or for competitive exams as well
ruclips.net/video/OVcoHHGJvUk/видео.html
❤
Damn man i searched a lot of videos for dsa and urs is the only one i actually understood.Thank you keep up the good work!
That's great to know Loukik, please do Subscribe to our channel as we have a lot tech educational content which you'll surely like. Also please do share our channel and videos with your friends too, that's the biggest help and support you can provide buddy ✌
awesome bro...always with u... :)
Thanks bro 😊👍
Bro, you are amazing!!!
Please upload videos on dynamic programming as well.
Sure I will
Can you tell me what is the time complexity of
Enqueue=?
Dequeue=?
Best case and worst case ☺️
Thanku so much bhaiya
very nice !!! i super i like all your videos
Thank you so much 😀
damm man you are great and your teaching meathod is also too good please complete this palylist fast bro plaese upload more types of algorithms and hashing one also pleasebro and keep it up
bro when we do front++ why preceding value gets erased we have only shifted the arrow
Because now front points next index so previous value become garbage
Dude superb explaination
Thanks bro 🤟 glad you liked it. Please do share the video with your friends too ✌️
awesome dude tqsm
Happy to help😇
Please sir read it Sir size of array is n and we dequeue elements from 0 to n-2 and we check isfull(rear==n-1) I thik it return true so is there any way to solve this problem
thank u sir. all concept u covered.
Thats really great to know buddy🙏 Please support me by sharing the videos and our channel with your friends too. Thats the biggest help and support you can provide 😇
Hlw bro your vedios are very useful keep going
Thank you so much buddy. I am glad to see this response from you. Please do subscribe to this channel & share the videos with your friends too. That will be the biggest help and support for everyone 😇
why we are incrementing front in enqueue operation? like enqueue can be performed by using rear only. right? so why here u had increment front to 0? let it point to -1 only...we will use front in dequeue. so there we should increment the value of front na?
bro suppose the queue size is 4 and we enqueue 4 values and we dequeue 1 value now front var points 1 and rear var points 3 then will it denote queue as full caz rear var = size(arr)-1 ....? but we have 1 free unused space at front
It does make sense
Hey please make a video on STL IF POSSIBLE... love your all videos...
You've earned your subscriber.
Welcome to Simple Snippets family!
Bro U are life saver subscribed good work man
Glad I could help. Please share the videos and channel with your friends too. Thats the biggest support you can show for our community.
Simple Snippets for sure man
I am lil confused as why will queue does not require pointer for rear or front .
*Osm Sir..*
Thank you so much Fazal I am glad to see this response from you. Please do subscribe to this channel & share the videos with your friends too. That will be the biggest help and support for everyone 😇
@@SimpleSnippets ok sir...
Congratulations for 100k in advance 😀
Thank you so much 😀
Please find a solution for that, because I do not understand Hindi, and your explanation is very beautiful. I hope that you will add automatic translation into Arabic in all the course videos as soon as possible, as in the stack lesson.
awesome bro, go on
Thanks bro ✌️😊 please do share the videos ✌️
@@SimpleSnippets of course
Thank you so much buddy 😊✌️
This course is good or as per the level of faang companies???
Thank you sir
Most welcome buddy 😇 Please share it ✌
On point.
Thats the whole motto of my videos, to be on point 😇✌
is this by using linked list
easy to know. thanks.
Glad it was helpful!
Awesome
Thanks bro 😁 please share the videos with your friends ✌️
My Saviour
Legend
Glad it helped! Keep up the support by sharing the videos with your friends too! 😇
Is this course enough for placement????
what's the difference b/w learning dsa using struct nd classes?
Not much
Bhaiya complete roadmap bnao ds algo in C++ Khan se kre on utube.Really need..by a person like u..
Thanks bro
Welcome Please support me by sharing the videos and our channel with your friends too. Thats the biggest help and support you can provide 😇
14:20 isempty should have parenthesis
I have a doubt...
If the queue is full ..and we remove a item from front , after that can't we entre a new value at back (by shifting every object forward )
We can if we want to, but standard queue conventionally does not provide facility ✌
@@SimpleSnippets Bro I watched some videos on queue . they shifted every object forward while performing Dequeue operation
Well the operation is dependent on how you implement. Even their implementation is correct. 😊✌️
Sir will u give us notes of that
thank u so much bhai for wrking this great for making us to understand in the best way ever.... i love the way u explain.. i have a small doubt i hope u wll definitely clarify it ... i have done ur oops with c++, datastructures and in progress with java.
suggest me what should i proceed with the next course after these to get good job oppurtunities to get settle well. plz bhai.
Thank you so much and I am very happy to know that you have gained so much knowledge. Start with competitive programming practice now.
@@SimpleSnippets I think u dint started the play list on competitive programming yet...
Only one video is there ryt?
Yeah that's a long way to go. DSA is left so will complete that first ✌️
@@SimpleSnippets OK bhai thank u so muchhh... Happy to see ur reply 😍🙈
I wll be waiting fr ur new playlistts
Thanks, after hours of mental torture, you saved me!
Hehe glad to be your saviour 🤟 please do share our videos with your friends too and definitely Subscribe 😁 thats the biggest help & support 🤟
You deserve 100M subscribers. 🙏
Please make video on heap
Thanks Anoop! And yes will cover Heap soon!
Can I get these slides please?
الشرح يجنن عراقية مرت من هنا
Wayne automatic translation of the Arabic language
Please find a solution for that, because I do not understand Hindi, and your explanation is very beautiful. I hope that you will add automatic translation into Arabic in all the course videos as soon as possible, as in the stack lesson.
Bhai
Pls tree haep hash pr bhi video bana do
Pls pls
Nice
Most welcome 😊
EARNED A SUB
Welcome to Simple Snippets fam!
Dude one series on STL plz... It's very confusing for most of us
Will do in future ✌
Does this playlist cover all tha data structures and alogs ?????
Not yet but soon it will 😇 Please support me by sharing the videos and our channel with your friends too. Thats the biggest help and support you can provide 😇
pls provide ppts and code. it is necessary for teaching students
Why couldn't we use pointer??