In this paper, we study the fundamental problem of sorting a data stream
when internal storage is limited. As the nature of the problem makes rearrang-
ing the data into a sorted stream impossible, by sorting we mean determining
the ordering of the elements of the stream. In our model, the amount of available
internal storage limits the number of elements of the data stream that can be
stored internally. Furthermore, only elements in internal storage can be com-
pared with each other. Lack of storage capable of holding the whole data stream
implies that sorting must be approximate; the goal is to produce a permutation
that represents the ordering of the elements of the data stream as faithfully as
possible. As in [1], we consider algorithms that make only one pass over the data
stream.