A binary search tree is provided for efficiently organizing values for a
set of items, even when values are duplicated. In generating the binary
search tree, the value of each item in a set of values is determined. If
a particular value is unique and is found only once in the set, than that
unique value is used as a node in the binary search tree. If a value is
duplicative and is found two or more times in the set, then the
duplicative value is used as a hook in the binary search tree. The hook
element has a list branch that is used to identify items having a value
equal to the duplicative value. A node tree may be extended from a second
branch of the hook, with the node tree having a base node equal to the
duplicative value. The base node may have a first branch for holding a
value less than the duplicative value, and a second branch for holding a
value greater than the duplicative value.