Summary
Keywords
Full Transcript
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
