This code illustrates what is referred to as the "linear construction algorithm"
in the paper, Ehrenfeucht, A., McConnell, R. M., Osheim, N., Woo, S.-W., 
Position Heaps: A Simple and Dynamic Text Indexing Data Structure, Journal 
of Discrete Algorithms, DOI:10.1016/j.jda.2010.12.001.

The algorithm illustrated here for employing the position heap to find 
the positions in a text where a pattern string occurs is what is called
the "naive query algorithm" in the text.

See heap.cpp for summary comments about how it works.

Implementations of other algorithms from the paper are forthcoming
at this site.
