Chris Blaicher wrote: <begin extract> I guess my main point is when making significant changes you need to have situational awareness. A good choice for one situation may be a terrible choice for another.
On the question of design, I would vote for using hashing, if you have a hashable key. It eliminates the maintenance of the binary tree and it is faster. <end extract> His first point is valid always and everywhere. His second reflects his views and experience. My different experience suggests 1) that BSTs are almost always much faster than hashing schemes and 2) that they scale up much better than hashing schemes. Still, hashing has its uses; and this application may be one of them. Much depends upon how the subset of keys that have the same hash value is managed. (The traditional approach of using ordered linear lists of the elements of each of these subsets is simple but yields unattractive performance.) John Gilmore, Ashland, MA 01721 - USA ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
