Please note that the content of this book primarily consists of articles
available from Wikipedia or other free sources online. In computer
science, the all nearest smaller values problem is the following task:
for each position in an unordered sequence of numbers, search among the
previous positions for the last position that contains a smaller value.
This problem can be solved efficiently both by parallel and non-parallel
algorithms: Berkman, Schieber & Vishkin, who first identified the
procedure as a useful subroutine for other parallel programs, developed
efficient algorithms to solve it in the Parallel Random Access Machine
model; it may also be solved in linear time on a non-parallel computer
using a stack-based algorithm. Later researchers have studied algorithms
to solve it in other models of parallel computation.