[erlang-questions] finding the nearest key in a key-value table

Jesper Louis Andersen jesper.louis.andersen@REDACTED
Tue May 27 14:30:25 CEST 2014


On Tue, May 27, 2014 at 2:27 PM, Joe Armstrong <erlang@REDACTED> wrote:

> Seems to work - so to find the K nearest I just iterate prev and next
> keeping track of
> which direction I have to move - very nice.
>

Yes. Coincidentally, this is also the approach taken by the fastest
knapsack solver in existence, together with a dynamic programming table.
But I digress :)


-- 
J.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140527/0ce693c6/attachment.htm>


More information about the erlang-questions mailing list