“…This method has been described in several places, most notably by Knuth (1973) whose description provides the basis for the routines presented here. Height balanced trees, also known as AVL trees, have been suggested for statistical applications by Leathers (1977) in connection with the case of joint frequency distributions; the present algorithm is believed to offer several advantages in flexibility and generality.…”