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

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -