Stacks are an ordered collection of data items that can only be accessed at the top of the stack. Items are added and removed based on the LIFO (last in, first out) principle, with the last item added being the first item removed. Stacks have push and pop operations for adding and removing items from the top of the stack.
Download as PPTX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
41 views
Lecture 3 Data Structure
Stacks are an ordered collection of data items that can only be accessed at the top of the stack. Items are added and removed based on the LIFO (last in, first out) principle, with the last item added being the first item removed. Stacks have push and pop operations for adding and removing items from the top of the stack.