stacks size top stack figure sample object of the stack adt implemented as linked list the peek(method simply returns reference to the data item in the first node after verifying the stack is not empty if the method were used on the stack represented by the linked list in figure reference to would be returned the peek operation is only meant to examine the item on top of the stack it should not be used to modify the top item as this would violate the definition of the stack adt the pop(method always removes the first node in the list this operation is illustrated in figure (athis is easy to implement and does not require search to find the node containing specific item the result of the linked list after popping the top item from the stack is illustrated in figure (bthe linked list implementation of the stack adt is more efficient than the python-list based implementation all of the operations are ( in the worst casethe proof of which is left as an exercise size top stack (asize top stack (bfigure popping an item from the stack(athe required link modificationsand (bthe result after popping the top item stack applications the stack adt is required by number of applications encountered in computer science in this sectionwe examine several basic applications that traditionally are presented in data structures course