Concise Introduction to Stacks

# Introduction In computer science, a stack is an abstract data type that serves as a collection of elements, with two main operations: push, which adds an element to the collection, and pop, which removes the most recently added element that was not yet removed. Other operations include peek, which returns the most recently added element without removing it, and is_empty, which checks if the stack is empty.

|60 : 00

Click the virtual machine below to start practicing