Friday, August 10, 2001 11:34 AM
Don't forget that you'll have to
your collection before you
it, since the binary search algorithm only works on sorted data.
If you find that your data set changes a lot, forget sorting and then searching every time. Just perform a linear search.
Do you have hard performence demands? If not, just write whatever code is easiest to write/read/maintain.