40 Algorithms Every Programmer Should Know
上QQ阅读APP看书,第一时间看更新

Practical example

A stack is used as the data structure in many use cases. For example, when a user wants to browse the history in a web browser, it is a LIFO data access pattern and a stack can be used to store the history. Another example is when a user wants to perform an Undo operation in word processing software.