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

Popular posts from this blog

Multilayer CSV to filtered excel -

Listboxes in c# -

ios - Why must I define variables twice in the Header file? -