1

Stacks and Queues using STL

 1 year ago
source link: https://www.geeksforgeeks.org/videos/stacks-and-queues-using-stl/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Stacks and Queues using STL

Stacks and Queues using STL
Hi, and welcome to weeks for gigs
  • 20 Views
  • 12/05/2022

Stacks are a type of container adaptors with LIFO(Last In First Out) type of working, where a new element is added at one end (top) and an element is removed from that end only. Stack uses an encapsulated object of either vector or deque (by default) or list (sequential container class) as its underlying container, providing a specific set of member functions to access its elements.

Queues are a type of container adaptors that operate in a first in first out (FIFO) type of arrangement. Elements are inserted at the back (end) and are deleted from the front. Queues use an encapsulated object of deque or list (sequential container class) as its underlying container, providing a specific set of member functions to access its elements.

Stack in C++ STL: https://www.geeksforgeeks.org/stack-in-cpp-stl/

Queue in C++ STL: https://www.geeksforgeeks.org/queue-cpp-stl/


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK