I'd love to be able to use one of Kyoto Cabinet's tree datastructures, but I need the ability to return the nearest key.
Ie I have
1,100
3,500
7,1000
And given 2, I'd return 1.
Is this possible? If not, what is a lightweight, high speed alternative turned to do exactly this?
Thanks