On Sat, May 14, 2011 at 5:05 PM, Mateus .. <excanoe / gmail.com> wrote:

> Hi!
>
> I'm interesting, what is the best way to find nearest element in array
> in comparison with "needle"?
>
> Thank you!
>
>
hi, ok, i'm not sure i understand the question.  are you asking  for the
'nearest' as in ["foo", "needle", "bar", "baz"] with "foo" & "bar" being the
nearest, or something like a hamming distance (
http://en.wikipedia.org/wiki/Hamming_distance) which would be ["foo",
"needle", "bar", "baz", "feedle"] and "needle" & "feedle" being nearest
(because they have a hamming distance of 0 & 1 respectively).
hex