json - Data Structure for Range Matching Lookup -
assume have structure of ranges, , associated data, instance:
data [ [ [0, 100], "new york"], [ [101, 200], "boston"], ... ]
for function receives n
arguments , returns entry n
in range of left element.
for instance,
> 103 < "boston"
what best structure transform above achieve fastest lookup time?
if data set should dynamic, use interval tree.
Comments
Post a Comment