You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
This lesson covers the stack — a fundamental Abstract Data Type (ADT) that follows the Last-In, First-Out (LIFO) principle. Stacks are used extensively in computing, from managing function calls to evaluating expressions.
A stack is an ordered collection of elements where:
Think of a stack of plates: you always add to the top and remove from the top. You cannot access plates in the middle without removing the ones above.
TOP → [ 30 ]
[ 20 ]
[ 10 ]
BOTTOM
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.