September 2017
Beginner to intermediate
290 pages
6h 58m
English
A stack is a LIFO (Last In First Out) arrangement of data. The simplest example would be the process/thread stack. Although such an implementation is rather array based, it fairly illustrates the mechanism.
However, most of the time, we would not know the size of the required stack in advance, maybe just a rough estimation. Not to mention the fact that we would hardly need to store only double or quad words; we'll mostly have more complex structures. The most common implementation of a stack would be a singly linked list addressed by a top pointer only. Ideally, only three operations are permitted on a stack:
Read now
Unlock full access