Stacks & Queues in Data Structures 2023 π
Learn about stacks and queues, key data structures often asked in interviews, with this comprehensive and easy tutorial for 2023.

SCALER
2.9K views β’ Aug 2, 2021

About this video
Stacks and Queues are a crucial part of Data Structures. They are commonly asked during coding interviews and are quite handy when it comes to solving certain type of questions. Learn more about Scaler: https://bit.ly/3xhe8bN
πΉ What are Stacks and Queues in Data Structure and Algorithm?
- Stack is a last in first out (lifo) linear data structure. Imagine stack in DS Algo as a pile of blocks. You can remove the block at the top quite easily. But if you have to remove the block at the end of the pile, you have to remove all the other blocks as well. Elements in Stack can be inserted or deleted only from one side. The insertion of an element into a stack is called push operation and the deletion of an element from the stack is called the pop operation.
- Queue is a first in first out (fifo) linear data structure. Elements in Queue can only be inserted and deleted from opposite sides. The insertion of an element in Queue is called as enqueue operation and the deletion of an element is referred to as an dequeue operation.
Learning Data Structures and Algorithms is non-negotiable since they help execute effective programs.
The following topics are covered in this video ππΌ
0:00 - Introduction to Stacks and Queues
1:19 - What is a Stack?
4:50 - Operations on Stacks
9:09 - Applications of Stacks
12:13 - Implementation of Stack
48:40 - Queue in Data Structure
56:53 - Nearest Smaller Element Problem
1:05:36 - Largest Rectangle in Histogram Problem
1:25:18 - Sliding Window Maximum Problem
---------------------------------------- About Scaler --------------------------------------------------
We are a tech-focused upskilling and reskilling platform catering to tech enthusiasts in universities and working professionals. There are more Scaler graduates working at Amazon than all of the IITs combined!
Learn more about Scaler - https://bit.ly/3xhe8bN
π Follow us on Social and be a part of an amazing tech communityπ
π Meet like-minded coder folks on Discord - https://discord.com/invite/ejFeksEtTq
π Tweets you cannot afford to miss out on - https://twitter.com/scaler_official
π Check out student success stories, expert opinions, and live classes on Linkedin - https://www.linkedin.com/school/scalerofficial
π Explore value-packed Reels and Carousels and get access to exclusive updates on Instagram - https://www.instagram.com/scaler_official/
π’ Be a part of our one of a kind telegram community: https://t.me/Scalercommunity
π Hit that bell icon to get notified of all our new videos π
If you liked this video, please don't forget to like and comment. Never miss out on our exclusive videos to help boost your coding career! Subscribe to Scaler now!
https://www.youtube.com/Scaler?sub_confirmation=1
#stacks #queues #dsalgo
πΉ What are Stacks and Queues in Data Structure and Algorithm?
- Stack is a last in first out (lifo) linear data structure. Imagine stack in DS Algo as a pile of blocks. You can remove the block at the top quite easily. But if you have to remove the block at the end of the pile, you have to remove all the other blocks as well. Elements in Stack can be inserted or deleted only from one side. The insertion of an element into a stack is called push operation and the deletion of an element from the stack is called the pop operation.
- Queue is a first in first out (fifo) linear data structure. Elements in Queue can only be inserted and deleted from opposite sides. The insertion of an element in Queue is called as enqueue operation and the deletion of an element is referred to as an dequeue operation.
Learning Data Structures and Algorithms is non-negotiable since they help execute effective programs.
The following topics are covered in this video ππΌ
0:00 - Introduction to Stacks and Queues
1:19 - What is a Stack?
4:50 - Operations on Stacks
9:09 - Applications of Stacks
12:13 - Implementation of Stack
48:40 - Queue in Data Structure
56:53 - Nearest Smaller Element Problem
1:05:36 - Largest Rectangle in Histogram Problem
1:25:18 - Sliding Window Maximum Problem
---------------------------------------- About Scaler --------------------------------------------------
We are a tech-focused upskilling and reskilling platform catering to tech enthusiasts in universities and working professionals. There are more Scaler graduates working at Amazon than all of the IITs combined!
Learn more about Scaler - https://bit.ly/3xhe8bN
π Follow us on Social and be a part of an amazing tech communityπ
π Meet like-minded coder folks on Discord - https://discord.com/invite/ejFeksEtTq
π Tweets you cannot afford to miss out on - https://twitter.com/scaler_official
π Check out student success stories, expert opinions, and live classes on Linkedin - https://www.linkedin.com/school/scalerofficial
π Explore value-packed Reels and Carousels and get access to exclusive updates on Instagram - https://www.instagram.com/scaler_official/
π’ Be a part of our one of a kind telegram community: https://t.me/Scalercommunity
π Hit that bell icon to get notified of all our new videos π
If you liked this video, please don't forget to like and comment. Never miss out on our exclusive videos to help boost your coding career! Subscribe to Scaler now!
https://www.youtube.com/Scaler?sub_confirmation=1
#stacks #queues #dsalgo
Tags and Topics
Browse our collection to discover more content in these categories.
Video Information
Views
2.9K
Likes
74
Duration
01:41:29
Published
Aug 2, 2021
User Reviews
4.5
(2) Related Trending Topics
LIVE TRENDSRelated trending topics. Click any trend to explore more videos.
Trending Now