Stack Let T be a data type. A stack of type T, denoted by Stack<T>, is a sequence of objects of type T with the following methods: push(value: T): adds value to the end of stack; pop() -> T: removes last object of stack, and returns it.