Dan Bolser - 2005-03-24

Logged In: YES
user_id=810134

I think I meant a *heap* not a *hash*. Use the heap to store
the smallest difference between the two numbers, then take
that pair off the heap, cluster (if < thresh), stick the new
number in the heap and re-sort the heap.

I think that makes it O(n log n) in the worst case, and you
could optimize against the worst case if the threshold is
bigger than the average value (in which case I think their
is only ever one cluster (not sure).