tailieunhanh - Data Structures and Algorithms - Chapter 3 -STACK

Stack ADTDEFINITION: A Stackof elements of type T is a finite sequence of elements of T, in which all insertions and deletions are restricted to one end, called the top. Stackis a Last In -First Out (LIFO) data operations: •Construct a stack, leaving it empty. •Pushan element. •Popan element. •Top an element. | Chapter 3 - STACK Definition of Stack Specifications for Stack Implementations of Stack Linked Stack Contiguous Stack Applications of Stack 1 Linear List Concepts 2 Stack ADT DEFINITION A Stack of elements of type T is a finite sequence of elements of T in which all insertions and deletions are restricted to one end called the top. Stack is a Last In - First Out LIFO data structure. Basic operations Construct a stack leaving it empty. Push an element. Pop an element. Top an element.